diff --git a/flake.nix b/flake.nix index 4fe65e4..5089e83 100644 --- a/flake.nix +++ b/flake.nix @@ -68,7 +68,7 @@ "x86_64-linux" "aarch64-darwin" ]; - nixpkgs = top.nixunstable.lib.genAttrs systems ( + imported_packages = top.nixunstable.lib.genAttrs systems ( system: import top.nixunstable { inherit system; @@ -88,7 +88,7 @@ colmenaHive = top.colmena.lib.makeHive ( { meta = { - nixpkgs = nixpkgs.x86_64-linux; + nixpkgs = imported_packages.x86_64-linux; specialArgs = { inherit metadata @@ -117,11 +117,26 @@ ) self.nixosConfigurations) ); - darwinConfigurations = (import ./darwin { inherit top nixpkgs; }); + darwinConfigurations = ( + import ./darwin { + inherit top; + nixpkgs = imported_packages; + } + ); - nixosConfigurations = (import ./hosts { inherit top nixpkgs metadata; }); + nixosConfigurations = ( + import ./hosts { + inherit top metadata; + nixpkgs = imported_packages; + } + ); - homeConfigurations = (import ./home { inherit top nixpkgs metadata; }); + homeConfigurations = ( + import ./home { + inherit top metadata; + nixpkgs = imported_packages; + } + ); modules = import ./modules; @@ -137,7 +152,7 @@ }: { _module.args = { - pkgs = nixpkgs.${system}; + pkgs = imported_packages.${system}; }; packages = (import ./pkgs { inherit pkgs; }); diff --git a/hosts/default.nix b/hosts/default.nix index 6330b17..8b84551 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -11,20 +11,17 @@ let channel ? top.nixunstable, extraMods ? [ ], name, - system ? "x86_64-linux", hm ? top.hmunstable, }: + let + inherit (metadata.hosts.${name}) system; + in channel.lib.nixosSystem { + pkgs = nixpkgs.${system}; specialArgs = { inherit metadata top; }; modules = [ - { - nixpkgs = { - inherit system; - pkgs = nixpkgs.${system}; - }; - } # Imported ones top.agenix.nixosModules.default hm.nixosModules.home-manager @@ -51,10 +48,7 @@ in iso = unstable { name = "iso"; }; # nix build '.#nixosConfigurations.wsl.config.system.build.installer' - nixos = wsl { - name = "wsl"; - system = "aarch64-linux"; - }; + nixos = wsl { name = "wsl"; }; # nix build '.#nixosConfigurations.wsl-aarch.config.system.build.installer' #nixos-arm = wsl { #name = "wsl"; diff --git a/hosts/exodus/hardware-configuration.nix b/hosts/exodus/hardware-configuration.nix index d57844c..89e74bb 100644 --- a/hosts/exodus/hardware-configuration.nix +++ b/hosts/exodus/hardware-configuration.nix @@ -43,6 +43,5 @@ # networking.interfaces.enp0s13f0u1.useDHCP = lib.mkDefault true; # networking.interfaces.wlp170s0.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/genesis/hardware-configuration.nix b/hosts/genesis/hardware-configuration.nix index 43e7ae9..16b048b 100644 --- a/hosts/genesis/hardware-configuration.nix +++ b/hosts/genesis/hardware-configuration.nix @@ -31,6 +31,4 @@ networking.useDHCP = lib.mkDefault true; # networking.interfaces.ens18.useDHCP = lib.mkDefault true; # networking.interfaces.ens19.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; } diff --git a/hosts/hosea/hardware-configuration.nix b/hosts/hosea/hardware-configuration.nix index 645a26f..c581413 100644 --- a/hosts/hosea/hardware-configuration.nix +++ b/hosts/hosea/hardware-configuration.nix @@ -50,6 +50,5 @@ # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/isaiah/hardware-configuration.nix b/hosts/isaiah/hardware-configuration.nix index 2abe7ad..8b33012 100644 --- a/hosts/isaiah/hardware-configuration.nix +++ b/hosts/isaiah/hardware-configuration.nix @@ -93,6 +93,5 @@ # networking.interfaces.enp39s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp42s0f3u5u3c2.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/jeremiah/hardware-configuration.nix b/hosts/jeremiah/hardware-configuration.nix index e67f5ce..7ef2275 100644 --- a/hosts/jeremiah/hardware-configuration.nix +++ b/hosts/jeremiah/hardware-configuration.nix @@ -49,6 +49,5 @@ # networking.interfaces.enp68s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlo2.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/proxmoxtemplate/hardware-configuration.nix b/hosts/proxmoxtemplate/hardware-configuration.nix index 1ef3394..fc67647 100644 --- a/hosts/proxmoxtemplate/hardware-configuration.nix +++ b/hosts/proxmoxtemplate/hardware-configuration.nix @@ -47,6 +47,4 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp6s18.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; } diff --git a/hosts/vm-gitlab/hardware-configuration.nix b/hosts/vm-gitlab/hardware-configuration.nix index 0c8a91c..7ff9d2c 100644 --- a/hosts/vm-gitlab/hardware-configuration.nix +++ b/hosts/vm-gitlab/hardware-configuration.nix @@ -55,6 +55,4 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp6s18.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; } diff --git a/network.json b/network.json index ebc1b0d..43a4f65 100644 --- a/network.json +++ b/network.json @@ -19,32 +19,35 @@ "ip": "10.42.1.5", "ts": "100.88.91.27", "system": "x86_64-linux", - "tags": [ "router", "server" ] + "tags": ["router", "server"] }, "hosea": { "ip": "10.42.1.7", "ts": "100.68.203.1", "system": "x86_64-linux", - "tags": [ "server" ] + "tags": ["server"] }, "icdm-root": { + "system": "x86_64-linux" }, "isaiah": { "builder": true, "ip": "10.42.1.6", "ts": "100.84.183.79", "system": "x86_64-linux", - "systems": [ "x86_64-linux", "aarch64-linux" ], - "tags": [ "builder", "kube", "server" ] + "systems": ["x86_64-linux", "aarch64-linux"], + "tags": ["builder", "kube", "server"] + }, + "iso": { + "system": "x86_64-linux" }, - "iso": {}, "jeremiah": { "builder": true, "ip": "10.42.1.8", "ts": "100.102.186.39", "system": "x86_64-linux", - "systems": [ "x86_64-linux", "aarch64-linux" ], - "tags": [ "builder", "kube", "server" ] + "systems": ["x86_64-linux", "aarch64-linux"], + "tags": ["builder", "kube", "server"] }, "joel": { "ip": "10.42.0.4", @@ -55,22 +58,31 @@ "ip": null, "ts": "100.109.86.8", "system": "x86_64-linux", - "tags": [ "public", "server" ] + "tags": ["public", "server"] }, "nas1": { "ip": "10.42.1.14", "ts": "100.114.187.61" }, - "nixos": {}, - "proxmoxtemplate": {}, - "vm-gitlab": {}, + "nixos": { + "system": "x86_64-linux" + }, + "proxmoxtemplate": { + "system": "x86_64-linux" + }, + "vm-gitlab": { + "system": "x86_64-linux" + }, + "wsl": { + "system": "aarch64-linux" + }, "zeke": { "builder": true, "ip": "10.42.1.13", "ts": "100.90.74.19", "system": "x86_64-linux", - "systems": [ "x86_64-linux", "aarch64-linux" ], - "tags": [ "builder", "kube", "server" ] + "systems": ["x86_64-linux", "aarch64-linux"], + "tags": ["builder", "kube", "server"] } } } diff --git a/overlays/default.nix b/overlays/default.nix index 86754cf..a61c578 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -18,7 +18,7 @@ final: prev: qemu = prev.qemu.override { sdlSupport = true; }; # Overrides of packages attic-client = prev.attic-client.overrideAttrs { - patches = prev.attic-client.patches ++ [ ./attic-client.patch ]; + # patches = prev.attic-client.patches ++ [ ./attic-client.patch ]; }; libbluray-custom = prev.libbluray.override { withAACS = true; diff --git a/pkgs/default.nix b/pkgs/default.nix index 37560f5..8a824a9 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,4 +1,8 @@ -{ pkgs, ... }: +{ + pkgs, + system ? pkgs.stdenv.hostPlatform.system, + ... +}: let c = pkgs.callPackage; @@ -19,7 +23,7 @@ in upgrade-pg-cluster = c ./upgrade-pg-cluster.nix { }; } // ( - if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then + if system == "x86_64-linux" then { qemu-hook = c ./qemu-hook.nix { }; vfio_startup = c ./vfio_startup.nix { };