From e7d4a6b19968a635650a0207f0c0a9c48d8de4a3 Mon Sep 17 00:00:00 2001 From: "root@procul" Date: Sun, 11 Apr 2021 18:08:54 +0000 Subject: [PATCH] Add hardware config for procul --- config/hardware/procul.nix | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 config/hardware/procul.nix diff --git a/config/hardware/procul.nix b/config/hardware/procul.nix new file mode 100644 index 0000000..1e0dd55 --- /dev/null +++ b/config/hardware/procul.nix @@ -0,0 +1,59 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ]; + + boot = { + initrd.availableKernelModules = [ + "uhci_hcd" + "ehci_pci" + "ahci" + "mptsas" + "usbhid" + "usb_storage" + "sd_mod" + "sr_mod" + ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + kernelPackages = pkgs.linuxPackages_latest; + + loader.grub = { + enable = true; + version = 2; + device = "/dev/sdb"; + }; + + runSize = "50%"; + }; + + system.stateVersion = "20.03"; + + fileSystems."/" = { + device = "/dev/disk/by-label/root"; + fsType = "btrfs"; + }; + + swapDevices = [{ device = "/dev/disk/by-label/swap"; }]; + + nix.maxJobs = lib.mkDefault 8; + + hardware.bluetooth.enable = false; + + networking = { + macvlans = { + extif0 = { + interface = "enp0s25"; + mode = "bridge"; + }; + }; + + interfaces = { + extif0 = { + # Output of: echo procul-extif0|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/' + macAddress = "02:c7:88:28:04:2e"; + }; + }; + }; +}