From cecef62695ca628c727dff794de12baa23e03db1 Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Sat, 2 Nov 2024 00:08:10 +0100 Subject: [PATCH] adds laptop hardware config Signed-off-by: Menno van Leeuwen --- config/nixos/hardware/mennos-laptop.nix | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 config/nixos/hardware/mennos-laptop.nix diff --git a/config/nixos/hardware/mennos-laptop.nix b/config/nixos/hardware/mennos-laptop.nix new file mode 100644 index 0000000..89c1d49 --- /dev/null +++ b/config/nixos/hardware/mennos-laptop.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" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/1356cd09-5c55-45b5-8b06-6aadc84cee37"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-32bf1c42-e6ef-4fb8-9b76-8bb13b9ea155".device = "/dev/disk/by-uuid/32bf1c42-e6ef-4fb8-9b76-8bb13b9ea155"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/CD6B-8910"; + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}