summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/dishwasher/hardware-configuration.nix57
1 files changed, 50 insertions, 7 deletions
diff --git a/hosts/dishwasher/hardware-configuration.nix b/hosts/dishwasher/hardware-configuration.nix
index 1652b60..9e506a6 100644
--- a/hosts/dishwasher/hardware-configuration.nix
+++ b/hosts/dishwasher/hardware-configuration.nix
@@ -9,9 +9,9 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
- boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
- boot.initrd.kernelModules = [ ];
- boot.kernelModules = [ "kvm-intel" ];
+ boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" "r8169" ];
+ boot.initrd.kernelModules = [ "r8169" ];
+ boot.kernelModules = [ "kvm-intel" "r8169" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
@@ -56,7 +56,50 @@
networking.interfaces.enp53s0.useDHCP = lib.mkDefault true;
networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
- nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
- powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
- hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-}
+ # hostId for zfs
+ networking.hostId = "7da4f1e6";
+
+ # extra zfs settings
+ boot = {
+ loader = {
+ efi.canTouchEfiVariables = true;
+ systemd-boot.enable = true;
+ };
+ supportedFilesystems = [ "zfs" ];
+ kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
+ kernelParams = [ "nohibernate" ];
+ zfs.devNodes = "/dev/";
+ plymouth.enable = false;
+ tmp.useTmpfs = true;
+ };
+
+ # remote unlock
+ boot.initrd.network = {
+ enable = true;
+ ssh = {
+ enable = true;
+ port = 2222;
+ hostKeys = [ "/etc/initrd-ssh/key" ];
+ authorizedKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDP6xE2ey0C8XXfvniiiHiqXsCC277jKI9RXEA+s2LQLUI5zl7v350i3Oa8H3NCcPj39lfMreqE6ncxcOhqYyzahPrrMkOqgbPAoRvq8H3ophLK+56O3xdHoKwLBwRD1yoGACjqG4UTiTrmnN2ateENgYcnTEY1e4vDw1qMj1drUXCsZ/6mkBBmHJiFfCaR4yCMt1r4gGi/dAC7ifnBP3oSyV/lJEwPxYYkGlbOBIvX/7Ar98pJS6xYPB3jHs9gwyNNON63d0fNYrwBojXPPCnGGaRZNOkBTzex3zZYp12ThINQ2xl8tRp9D8qpZ7vrLjhTD6AXkOBRzmDj+NsCeEaeTuWajqUM93iKncYUI+JxR1t7q8gA2pBMFzLesMXnx7R+5Kw7QDtSJM7a4GMIfsocPwf64BH6rzxEz68rXFE3P+J77PPM9CuaYw90JXHo3z220zYw2nMQ/1qjATVZw/hiVrLmQMVfmFJIufnGjTBs2sy3IoNyzvYm/oDeNNg1cdSV9gyyRKZhK08fxjXN5GSf9vZkfZa9tHtqaZ99HI40GQBHUVx1K2/NQJY8TVTSA+v16SFnJK8BIbmp/WFCuvDcMkgLIbqiYtDASe7P2mKIib86uOENT+P820egeLiTQ06kFw/gfUa8t69d5qEcjiQZ+lxCeYIs/E9KrEXHvRUWew== cardno:16 811 34" ];
+ };
+ };
+
+ services.zfs = {
+ trim.enable = true;
+ autoScrub = {
+ enable = true;
+ pools = [ "rpool" ];
+ };
+ autoSnapshot.enable = true;
+ };
+
+ # update the microcode
+ hardware.cpu.intel.updateMicrocode = true;
+ nixpkgs.config.allowUnfree = true;
+ hardware.enableAllFirmware = true;
+
+ services.logind.lidSwitch = "ignore";
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
+ }