diff options
author | Jasper Ras <jaspert.ras@gmail.com> | 2024-11-13 22:33:37 +0100 |
---|---|---|
committer | Jasper Ras <jaspert.ras@gmail.com> | 2024-11-13 22:39:43 +0100 |
commit | f1d8afcc156b14ce44dde407bd76661bdc821e03 (patch) | |
tree | ba0b24b0c869d5c68ca8f1e5acb29d325979837f /hosts/hardware-configuration | |
parent | 6c181cdefe9d8d7b2b6bd47d97c7c6768b7c2ae0 (diff) |
Use flake-utils-plus and set-up multiple hosts
Diffstat (limited to 'hosts/hardware-configuration')
-rw-r--r-- | hosts/hardware-configuration/tarrel.nix | 40 | ||||
-rw-r--r-- | hosts/hardware-configuration/work.nix | 41 |
2 files changed, 81 insertions, 0 deletions
diff --git a/hosts/hardware-configuration/tarrel.nix b/hosts/hardware-configuration/tarrel.nix new file mode 100644 index 0000000..4604fcd --- /dev/null +++ b/hosts/hardware-configuration/tarrel.nix @@ -0,0 +1,40 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "uas" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/b73c41ec-fe01-4fa5-b50a-fd871e8c2710"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/BBB8-1AF8"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f0u9.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/hardware-configuration/work.nix b/hosts/hardware-configuration/work.nix new file mode 100644 index 0000000..9c8c4b1 --- /dev/null +++ b/hosts/hardware-configuration/work.nix @@ -0,0 +1,41 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/df469cf1-1acc-4bf4-86e1-ec368e5a96a1"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-0f6e3603-084c-4438-9749-36b31b6f226a".device = "/dev/disk/by-uuid/0f6e3603-084c-4438-9749-36b31b6f226a"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/F0E6-4DF3"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} |