From b30e99dfb2d040ec47e2e772ca0d25b97cf54e21 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 12 Mar 2021 20:11:43 +0100 Subject: ma wbob.r: split config and hardware --- makefu/1systems/wbob/config.nix | 70 ++++-------------------------------- makefu/1systems/wbob/nuc/default.nix | 23 ++++++++++++ 2 files changed, 30 insertions(+), 63 deletions(-) create mode 100644 makefu/1systems/wbob/nuc/default.nix (limited to 'makefu') diff --git a/makefu/1systems/wbob/config.nix b/makefu/1systems/wbob/config.nix index 32dedbde..b70b4844 100644 --- a/makefu/1systems/wbob/config.nix +++ b/makefu/1systems/wbob/config.nix @@ -1,14 +1,15 @@ { config, pkgs, lib, ... }: let - rootdisk = "/dev/disk/by-id/ata-TS256GMTS800_C613840115"; - datadisk = "/dev/disk/by-id/ata-HGST_HTS721010A9E630_JR10006PH3A02F"; user = config.makefu.gui.user; primaryIP = "192.168.8.11"; in { imports = - [ # Include the results of the hardware scan. + [ + # Include the results of the hardware scan. + ./nuc + @@ -37,13 +38,13 @@ in { # Sensors # - + # - + # # { environment.systemPackages = [ pkgs.vlc ]; } @@ -94,44 +95,6 @@ in { build.host = config.krebs.hosts.wbob; }; - swapDevices = [ { device = "/var/swap"; } ]; - services.collectd.extraConfig = lib.mkAfter '' - - #LoadPlugin ping - # does not work because it requires privileges - # - # Host "google.de" - # Host "heise.de" - # - - LoadPlugin curl - - Interval 300 - TotalTime true - NamelookupTime true - ConnectTime true - - - MeasureResponseTime true - MeasureResponseCode true - URL "https://google.de" - - - - MeasureResponseTime true - MeasureResponseCode true - URL "http://web.de" - - - - #LoadPlugin netlink - # - # Interface "enp0s25" - # Interface "wlp2s0" - # IgnoreSelected false - # - ''; - networking.firewall.allowedUDPPorts = [ 655 ]; networking.firewall.allowedTCPPorts = [ 655 @@ -146,7 +109,7 @@ in { # Port = 1655 # ''; #}; - + boot.kernelPackages = pkgs.linuxPackages_latest; # rt2870.bin wifi card, part of linux-unfree hardware.enableRedistributableFirmware = true; nixpkgs.config.allowUnfree = true; @@ -156,24 +119,5 @@ in { address = "10.8.8.11"; prefixLength = 24; }]; - - # nuc hardware - boot.loader.grub.device = rootdisk; - hardware.cpu.intel.updateMicrocode = true; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - - boot.kernelModules = [ - "kvm-intel" "snd-seq" "snd-rawmidi" - ]; - fileSystems = { - "/" = { - device = rootdisk + "-part1"; - fsType = "ext4"; - }; - "/data" = { - device = datadisk + "-part1"; - fsType = "ext4"; - }; - }; } diff --git a/makefu/1systems/wbob/nuc/default.nix b/makefu/1systems/wbob/nuc/default.nix new file mode 100644 index 00000000..d4993dfd --- /dev/null +++ b/makefu/1systems/wbob/nuc/default.nix @@ -0,0 +1,23 @@ +let + rootdisk = "/dev/disk/by-id/ata-TS256GMTS800_C613840115"; + datadisk = "/dev/disk/by-id/ata-HGST_HTS721010A9E630_JR10006PH3A02F"; +in { + boot.loader.grub.device = rootdisk; + hardware.cpu.intel.updateMicrocode = true; + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + + boot.kernelModules = [ + "kvm-intel" "snd-seq" "snd-rawmidi" + ]; + fileSystems = { + "/" = { + device = rootdisk + "-part1"; + fsType = "ext4"; + }; + "/data" = { + device = datadisk + "-part1"; + fsType = "ext4"; + }; + }; + swapDevices = [ { device = "/var/swap"; } ]; +} -- cgit v1.2.3