From ed09581e5f45893e1e4e9fd49ecb53da03066cd4 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sat, 11 Nov 2023 15:01:23 +0300 Subject: [PATCH] Use /etc/nixos for hardware config --- flake.nix | 1 - machines/enka/default.nix | 8 +++++++- machines/enka/hardware.nix | 36 ------------------------------------ 3 files changed, 7 insertions(+), 38 deletions(-) delete mode 100644 machines/enka/hardware.nix diff --git a/flake.nix b/flake.nix index 51a8534..935b35c 100644 --- a/flake.nix +++ b/flake.nix @@ -120,7 +120,6 @@ boot.tmp.cleanOnBoot = true; networking.hostName = hostName; - nixpkgs.hostPlatform = hostPlatform; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; diff --git a/machines/enka/default.nix b/machines/enka/default.nix index fde061f..9832c1c 100644 --- a/machines/enka/default.nix +++ b/machines/enka/default.nix @@ -1,6 +1,11 @@ { lib, systemConfiguration, homeConfiguration, imports, ... }: lib.recursiveUpdate3 (systemConfiguration { + boot.loader = { + efi.canTouchEfiVariables = true; + systemd-boot.enable = true; + }; + system.stateVersion = "23.05"; }) @@ -30,8 +35,9 @@ ./steck ./fonts.nix - ./hardware.nix ./localisation.nix ./packages.nix ./users.nix + + /etc/nixos/hardware-configuration.nix ]) diff --git a/machines/enka/hardware.nix b/machines/enka/hardware.nix deleted file mode 100644 index 8cdec06..0000000 --- a/machines/enka/hardware.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ systemConfiguration, enabled, ... }: - -systemConfiguration { - hardware.enableAllFirmware = true; - powerManagement.cpuFreqGovernor = "performance"; - - boot.initrd.availableKernelModules = [ - "ahci" - "rtsx_pci_sdmmc" - "sd_mod" - "sr_mod" - "usbhid" - "xhci_pci" - ]; - - boot.loader = { - efi.canTouchEfiVariables = true; - systemd-boot = enabled {}; - }; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/cc473c12-94a9-4399-a0ab-f080f9e786f6"; - fsType = "ext4"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/D1F5-D862"; - fsType = "vfat"; - }; - - swapDevices = [ - { - device = "/dev/disk/by-uuid/f3a15cd2-9897-4867-9414-d4a8c3e71caf"; - } - ]; -}