diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-04-20 01:34:33 +0300 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-04-20 01:34:33 +0300 |
| commit | 286340b6f12e438616c01018ec8882e46f63f846 (patch) | |
| tree | 4deea2baf11520cc5d56bd1a9ff2b00ff6e196df /hosts/hardware-configuration-laptop.nix | |
| parent | 0c9444b0ce0fe243d857a00ac7f646c3adac0aa2 (diff) | |
Refactored nix config to make it slightly more modular
Diffstat (limited to 'hosts/hardware-configuration-laptop.nix')
| -rw-r--r-- | hosts/hardware-configuration-laptop.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/hosts/hardware-configuration-laptop.nix b/hosts/hardware-configuration-laptop.nix new file mode 100644 index 0000000..5dbd889 --- /dev/null +++ b/hosts/hardware-configuration-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/07da3892-5b26-43d5-9e41-dbab9f4a8067"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/4E6C-E7AD"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ { + device = "/var/lib/swapfile"; + size = 16*1024; + } ]; + + # 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.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} |
