From 175078feee34f8ba2fe17c3339b83ad61f862a2a Mon Sep 17 00:00:00 2001 From: Swarsel Date: Fri, 2 Aug 2024 01:57:15 +0200 Subject: [PATCH] feat: add nbl hardware config --- .../nbl-imba-2/hardware-configuration.nix | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 profiles/nbl-imba-2/hardware-configuration.nix diff --git a/profiles/nbl-imba-2/hardware-configuration.nix b/profiles/nbl-imba-2/hardware-configuration.nix new file mode 100644 index 0000000..25a6b65 --- /dev/null +++ b/profiles/nbl-imba-2/hardware-configuration.nix @@ -0,0 +1,71 @@ +# 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" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/3554892c-9d0b-49b2-b74a-8b5ef45569f7"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; + + boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/98b9bf76-ca01-49f5-91ee-1884ae9ce383"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5236-F44A"; + fsType = "vfat"; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/3554892c-9d0b-49b2-b74a-8b5ef45569f7"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/3554892c-9d0b-49b2-b74a-8b5ef45569f7"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; + + fileSystems."/persist" = + { device = "/dev/disk/by-uuid/3554892c-9d0b-49b2-b74a-8b5ef45569f7"; + fsType = "btrfs"; + options = [ "subvol=persist" ]; + }; + + fileSystems."/swap" = + { device = "/dev/disk/by-uuid/3554892c-9d0b-49b2-b74a-8b5ef45569f7"; + fsType = "btrfs"; + options = [ "subvol=swap" ]; + }; + + fileSystems."/var/log" = + { device = "/dev/disk/by-uuid/3554892c-9d0b-49b2-b74a-8b5ef45569f7"; + fsType = "btrfs"; + options = [ "subvol=log" ]; + }; + + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp196s0f3u1c2.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}