Fix building with Colmena.
Apply overlays and nixpkgs imports once Do not set hostPlatform explicitly, set it from the network.json file
This commit is contained in:
@@ -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; });
|
||||
|
||||
+5
-11
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,4 @@
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp6s18.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -55,6 +55,4 @@
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp6s18.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
|
||||
+25
-13
@@ -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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
+6
-2
@@ -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 { };
|
||||
|
||||
Reference in New Issue
Block a user