direnv: add to essential
[julm/julm-nix.git] / hosts / blackberry / pixiecore.nix
index c2f4dd0bb1008427ef8cbaa1ef1f44ef3299e0d2..61c1e523da69acb128e79355fcfcc906bb835a62 100644 (file)
@@ -1,61 +1,10 @@
-{ pkgs, lib, config, inputs, modulesPath, ... }:
+{ pkgs, lib, config, inputs, modulesPath, ... }@args:
 let
-  hostConfig = config;
   pixiecore = config.services.pixiecore;
-  pxeHostName = "nixos-pxe";
-  nixos = import (modulesPath + "/../lib/eval-config.nix") {
-    system = null;
-    specialArgs = {
-      # Required to avoid infinite recursion
-      # when `inputs` is used in `imports`.
-      inherit inputs;
-    };
-    modules = [
-      ({ config, pkgs, lib, ... }: {
-        imports = [
-          (modulesPath + "/installer/netboot/netboot-minimal.nix")
-          ../../nixos/default.nix
-        ];
-        config = {
-          nixpkgs.hostPlatform = {
-            system = "x86_64-linux";
-            config = "x86_64-unknown-linux-gnu";
-          };
-          ## Some useful options for setting up a new system
-          services.getty.autologinUser = lib.mkForce "root";
-          users.users.root.openssh.authorizedKeys.keys =
-            hostConfig.users.users.julm.openssh.authorizedKeys.keys;
-          console.keyMap = "de";
-          # hardware.video.hidpi.enable = true;
-
-          system.stateVersion = config.system.nixos.release;
-
-          _module.args = {
-            hostName = pxeHostName;
-            #hosts = nixosConfigurations;
-            #host = nixosConfigurations.${hostName}._module.args;
-          };
-          nixpkgs.overlays = import ../../nixpkgs/overlays.nix;
-          documentation = {
-            enable = false;
-            doc.enable = false;
-          };
-        };
-      })
-      inputs.home-manager.nixosModules.home-manager
-      {
-        home-manager.useGlobalPkgs = true;
-        home-manager.useUserPackages = true;
-        home-manager.verbose = true;
-        #home-manager.force = true;
-        home-manager.backupFileExtension = "old";
-        home-manager.extraSpecialArgs = {
-          hostName = pxeHostName;
-          inherit inputs;
-        };
-      }
-    ];
-  };
+  nixos = import ../minimal.nix
+    (args // {
+      modules = [ (modulesPath + "/installer/netboot/netboot-minimal.nix") ];
+    });
   build = nixos.config.system.build;
 in
 {