all repos — nixfiles @ 8008288a089315b056c2d8907ce4a6d2b19a3cad

System and user configuration, managed by nix and home-manager

hoist nixos-hardware imports to flake.nix
Alan Pearce alan@alanpearce.eu
Tue, 09 Apr 2024 21:06:38 +0200
commit

8008288a089315b056c2d8907ce4a6d2b19a3cad

parent

10e41ec96f7792ad50ba162bf97ae189fd01623c

2 files changed, 12 insertions(+), 7 deletions(-)

jump to
M flake.nixflake.nix
@@ -22,6 +22,7 @@ , emacs-overlay     , home-manager
     , nixpkgs
     , nix-index-database
+    , nixos-hardware
     , secrets
     , ...
     } @ attrs:
@@ -36,8 +37,15 @@ in     {
       nixosConfigurations.prefect = nixpkgs.lib.nixosSystem {
         system = "x86_64-linux";
-        specialArgs = attrs;
-        modules = [ ./system/prefect.nix ];
+        modules = [
+          ./system/prefect.nix
+        ] ++ (with nixos-hardware.nixosModules; [
+          common-cpu-amd
+          common-cpu-amd-pstate
+          common-pc-ssd
+          common-pc
+          common-gpu-nvidia-nonprime
+        ]);
       };
       nixosConfigurations.nanopi = nixpkgs.lib.nixosSystem {
         system = aarch64LinuxSystem;
M system/prefect.nixsystem/prefect.nix
@@ -1,13 +1,8 @@ { config
 , pkgs
-, nixos-hardware
 , ...
 }: {
   imports = [
-    (nixos-hardware + "/common/pc/ssd")
-    (nixos-hardware + "/common/cpu/amd")
-    (nixos-hardware + "/common/cpu/amd/pstate.nix")
-
     ./settings/base.nix
     ./settings/configuration/berlin.nix
     ./settings/configuration/british-english.nix
@@ -30,6 +25,8 @@ ./settings/programs/shell.nix     ./settings/programs/docker.nix
     ./settings/gaming.nix
   ];
+
+  nixpkgs.hostPlatform = "x86_64-linux";
 
   services.xserver.screenSection = ''
     Option "MetaModes" "2560x1440_165 +0+0 { ForceCompositionPipeline=On }"