refactored

This commit is contained in:
James Patrick 2022-03-04 22:21:58 -05:00
parent 5d72d0aba9
commit abaac8e512

View File

@ -36,54 +36,61 @@
this.systems.zfs.enable = true; this.systems.zfs.enable = true;
# This is required for the zfs module as well. Must be unique. Run the following head -c4 /dev/urandom | od -A none -t x4 networking = {
networking.hostId = "a7a1c3f5"; # This is required for the zfs module as well. Must be unique. Run the following head -c4 /dev/urandom | od -A none -t x4
networking.hostName = "nil"; # Define your hostname. hostId = "a7a1c3f5";
hostName = "nil"; # Define your hostname.
# The global useDHCP flag is deprecated, therefore explicitly set to false here. # The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config # Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour. # replicates the default behaviour.
networking.useDHCP = false; useDHCP = false;
networking.interfaces.enp2s0f0.useDHCP = true; interfaces = {
networking.interfaces.enp5s0.useDHCP = true; enp2s0f0.useDHCP = true;
networking.interfaces.wlp3s0.useDHCP = true; enp5s0.useDHCP = true;
wlp3s0.useDHCP = true;
boot.initrd.availableKernelModules = [ };
"nvme" };
"vfat"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
"sdhci_pci"
"cryptd"
];
hardware.firmware = [ pkgs.rtw89-firmware ]; hardware.firmware = [ pkgs.rtw89-firmware ];
boot.initrd.kernelModules = [ "dm-snapshot" ]; boot = {
boot.kernelModules = [ "kvm-amd" ]; initrd = {
boot.extraModulePackages = [ config.boot.kernelPackages.rtw89 ]; availableKernelModules = [
boot.supportedFilesystems = [ "zfs" ]; "nvme"
"vfat"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
"sdhci_pci"
"cryptd"
];
kernelModules = [ "dm-snapshot" ];
};
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ config.boot.kernelPackages.rtw89 ];
supportedFilesystems = [ "zfs" ];
};
boot.initrd.luks.devices."crypt" = { boot.initrd.luks.devices."crypt" = {
device = "/dev/disk/by-partlabel/crypt"; device = "/dev/disk/by-partlabel/crypt";
preLVM = true; preLVM = true;
}; };
fileSystems."/" = { fileSystems = {
device = "rpool/root/nixos"; "/" = {
fsType = "zfs"; device = "rpool/root/nixos";
}; fsType = "zfs";
};
fileSystems."/home" = { "/home" = {
device = "rpool/home"; device = "rpool/home";
fsType = "zfs"; fsType = "zfs";
}; };
"/boot" = {
fileSystems."/boot" = { device = "/dev/disk/by-partlabel/boot";
device = "/dev/disk/by-partlabel/boot"; fsType = "vfat";
fsType = "vfat"; };
}; };
swapDevices = [{ device = "/dev/partitions/swap"; }]; swapDevices = [{ device = "/dev/partitions/swap"; }];