From 776d6b4e42b981b6075ccd25d1987ce3812de832 Mon Sep 17 00:00:00 2001 From: serenity-F Date: Mon, 18 Nov 2024 23:00:49 +1000 Subject: [PATCH] uh --- hosts/persephone/modules/default.nix | 2 ++ hosts/persephone/modules/hardware.nix | 42 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 hosts/persephone/modules/hardware.nix diff --git a/hosts/persephone/modules/default.nix b/hosts/persephone/modules/default.nix index d81f757..c449973 100644 --- a/hosts/persephone/modules/default.nix +++ b/hosts/persephone/modules/default.nix @@ -6,6 +6,8 @@ ## Selected modules for import #./disko.nix # disk/partition config ./network.nix # network/internet config + ./hardware.nix # hardware configuration + ]; } diff --git a/hosts/persephone/modules/hardware.nix b/hosts/persephone/modules/hardware.nix new file mode 100644 index 0000000..e00fb1c --- /dev/null +++ b/hosts/persephone/modules/hardware.nix @@ -0,0 +1,42 @@ +# 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" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/cf5e06b5-77ae-48c8-9922-8a55743e2264"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-7a4cbdd2-59b4-4ebf-a9bb-f89edc0c8b85".device = "/dev/disk/by-uuid/7a4cbdd2-59b4-4ebf-a9bb-f89edc0c8b85"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/2B48-DE3E"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/e9023f1a-2988-4181-b5b4-970d3015e95a"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}