diff --git a/hosts/default.nix b/hosts/default.nix index e71a5c50..3c8289d2 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -2,14 +2,35 @@ withSystem, self, inputs, + config, ... }: { flake = { - nixosConfigurations = { - dumpyourvms = self.nixos-flake.lib.mkLinuxSystem { - nixpkgs.hostPlatform = "x86_64-linux"; + nixosModules = { + home-manager = { imports = [ + inputs.home-manager.nixosModules.home-manager + ({ + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { + flake = { + inherit self inputs config; + }; + }; + }) + ]; + }; + }; + nixosConfigurations = { + dumpyourvms = self.inputs.nixpkgs.lib.nixosSystem { + specialArgs = { + flake = { + inherit self inputs config; + }; + }; + modules = [ self.nixosModules.base ./dumpyourvms self.nixosModules.teutat3s @@ -24,9 +45,13 @@ ]; }; - ryzensun = self.nixos-flake.lib.mkLinuxSystem { - nixpkgs.hostPlatform = "x86_64-linux"; - imports = [ + ryzensun = self.inputs.nixpkgs.lib.nixosSystem { + specialArgs = { + flake = { + inherit self inputs config; + }; + }; + modules = [ self.nixosModules.base ./ryzensun self.nixosModules.teutat3s @@ -40,9 +65,13 @@ ]; }; - fae = self.nixos-flake.lib.mkLinuxSystem { - nixpkgs.hostPlatform = "aarch64-linux"; - imports = [ + fae = self.inputs.nixpkgs.lib.nixosSystem { + specialArgs = { + flake = { + inherit self inputs config; + }; + }; + modules = [ self.nixosModules.base inputs.nixos-hardware.nixosModules.raspberry-pi-4 ./fae @@ -52,9 +81,13 @@ ]; }; - #powder = self.nixos-flake.lib.mkLinuxSystem { - # nixpkgs.hostPlatform = "aarch64-linux"; - # imports = [ + #powder = self.inputs.nixpkgs.lib.nixosSystem { + # specialArgs = { + # flake = { + # inherit self inputs config; + # }; + # }; + # modules = [ # self.nixosModules.base # inputs.nixos-hardware.nixosModules.raspberry-pi-4 # ./powder @@ -65,9 +98,13 @@ # ]; #}; - iso = self.nixos-flake.lib.mkLinuxSystem { - nixpkgs.hostPlatform = "x86_64-linux"; - imports = [ + iso = self.inputs.nixpkgs.lib.nixosSystem { + specialArgs = { + flake = { + inherit self inputs config; + }; + }; + modules = [ "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" self.nixosModules.base ./iso @@ -75,10 +112,13 @@ ]; }; - iso-arm = self.nixos-flake.lib.mkLinuxSystem { - nixpkgs.hostPlatform = "aarch64-linux"; - nixpkgs.buildPlatform = "x86_64-linux"; - imports = [ + iso-arm = self.inputs.nixpkgs.lib.nixosSystem { + specialArgs = { + flake = { + inherit self inputs config; + }; + }; + modules = [ "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" self.nixosModules.base ./iso @@ -86,9 +126,13 @@ ]; }; - iso-graphical = self.nixos-flake.lib.mkLinuxSystem { - nixpkgs.hostPlatform = "x86_64-linux"; - imports = [ + iso-graphical = self.inputs.nixpkgs.lib.nixosSystem { + specialArgs = { + flake = { + inherit self inputs config; + }; + }; + modules = [ "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" self.nixosModules.base ./iso diff --git a/hosts/dumpyourvms/hardware-configuration.nix b/hosts/dumpyourvms/hardware-configuration.nix index fc7194b2..e3ff515a 100644 --- a/hosts/dumpyourvms/hardware-configuration.nix +++ b/hosts/dumpyourvms/hardware-configuration.nix @@ -43,4 +43,6 @@ size = 18432; } ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; } diff --git a/hosts/iso/default.nix b/hosts/iso/default.nix index 32659a58..9a1cc1b7 100644 --- a/hosts/iso/default.nix +++ b/hosts/iso/default.nix @@ -4,4 +4,5 @@ isoImage.squashfsCompression = "gzip -Xcompression-level 1"; systemd.services.sshd.wantedBy = lib.mkForce [ "multi-user.target" ]; networking.networkmanager.enable = false; + nixpkgs.hostPlatform = "x86_64-linux"; } diff --git a/hosts/ryzensun/hardware-configuration.nix b/hosts/ryzensun/hardware-configuration.nix index da7266bb..59d6f535 100644 --- a/hosts/ryzensun/hardware-configuration.nix +++ b/hosts/ryzensun/hardware-configuration.nix @@ -36,4 +36,6 @@ }; swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; }