Fix simd jobs
This commit is contained in:
parent
65107fc07e
commit
cc63c41ba0
51
flake.lock
51
flake.lock
|
@ -378,6 +378,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-mobilizon": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1664466500,
|
||||||
|
"narHash": "sha256-FvEUAKkf0PDZ2j2qIbI4+3oPTnuQq4HdX00iqBkvKOU=",
|
||||||
|
"owner": "minijackson",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "8a43afd5579f58092d4bf616a0206f83d8062e1f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "minijackson",
|
||||||
|
"ref": "init-mobilizon",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixos-unstable": {
|
"nixos-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1669542132,
|
"lastModified": 1669542132,
|
||||||
|
@ -394,6 +410,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-unstable-simd": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1670178567,
|
||||||
|
"narHash": "sha256-mTUbgiMxtXRg0VL0518HlZhF/CSYUJmBuZnNkc1mlaU=",
|
||||||
|
"owner": "SuperSandro2000",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9f915b466b047207d391a8b651f2949cc528e1b6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "SuperSandro2000",
|
||||||
|
"ref": "nixos-unstable-simd",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1663264531,
|
"lastModified": 1663264531,
|
||||||
|
@ -408,22 +440,6 @@
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-mobilizon": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1664466500,
|
|
||||||
"narHash": "sha256-FvEUAKkf0PDZ2j2qIbI4+3oPTnuQq4HdX00iqBkvKOU=",
|
|
||||||
"owner": "minijackson",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "8a43afd5579f58092d4bf616a0206f83d8062e1f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "minijackson",
|
|
||||||
"ref": "init-mobilizon",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-regression": {
|
"nixpkgs-regression": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1643052045,
|
"lastModified": 1643052045,
|
||||||
|
@ -523,8 +539,9 @@
|
||||||
"naersk": "naersk_2",
|
"naersk": "naersk_2",
|
||||||
"nixos": "nixos",
|
"nixos": "nixos",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
|
"nixos-mobilizon": "nixos-mobilizon",
|
||||||
"nixos-unstable": "nixos-unstable",
|
"nixos-unstable": "nixos-unstable",
|
||||||
"nixpkgs-mobilizon": "nixpkgs-mobilizon",
|
"nixos-unstable-simd": "nixos-unstable-simd",
|
||||||
"oparl-scraper": "oparl-scraper",
|
"oparl-scraper": "oparl-scraper",
|
||||||
"openwrt": "openwrt",
|
"openwrt": "openwrt",
|
||||||
"openwrt-imagebuilder": "openwrt-imagebuilder",
|
"openwrt-imagebuilder": "openwrt-imagebuilder",
|
||||||
|
|
92
flake.nix
92
flake.nix
|
@ -4,9 +4,10 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
# use sandro's fork full with cherry-picked fixes
|
# use sandro's fork full with cherry-picked fixes
|
||||||
nixos.url = "github:SuperSandro2000/nixpkgs/nixos-22.11";
|
nixos.url = "github:SuperSandro2000/nixpkgs/nixos-22.11";
|
||||||
nixpkgs-mobilizon.url = "github:minijackson/nixpkgs/init-mobilizon";
|
nixos-mobilizon.url = "github:minijackson/nixpkgs/init-mobilizon";
|
||||||
nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
nixos-hardware.url = "github:nixos/nixos-hardware";
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
||||||
|
nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
nixos-unstable-simd.url = "github:SuperSandro2000/nixpkgs/nixos-unstable-simd";
|
||||||
|
|
||||||
affection-src = {
|
affection-src = {
|
||||||
url = "git+https://gitea.nek0.eu/nek0/affection";
|
url = "git+https://gitea.nek0.eu/nek0/affection";
|
||||||
|
@ -173,7 +174,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, fenix, harmonia, heliwatch, microvm, naersk, nixos, nixos-hardware, nixos-unstable, caveman, oparl-scraper, scrapers, secrets, skyflake, sshlogd, sops-nix, spacemsg, ticker, tigger, yammat, zentralwerk, ... }:
|
outputs = inputs@{ self, fenix, harmonia, heliwatch, microvm, naersk, nixos, nixos-hardware, nixos-unstable, nixos-unstable-simd, caveman, oparl-scraper, scrapers, secrets, skyflake, sshlogd, sops-nix, spacemsg, ticker, tigger, yammat, zentralwerk, ... }:
|
||||||
let
|
let
|
||||||
inherit (nixos) lib;
|
inherit (nixos) lib;
|
||||||
|
|
||||||
|
@ -201,6 +202,37 @@
|
||||||
};
|
};
|
||||||
extraHostRegistry.hosts = import ./host-registry.nix;
|
extraHostRegistry.hosts = import ./host-registry.nix;
|
||||||
hostRegistry = lib.recursiveUpdate zwHostRegistry extraHostRegistry;
|
hostRegistry = lib.recursiveUpdate zwHostRegistry extraHostRegistry;
|
||||||
|
|
||||||
|
# Our custom NixOS builder
|
||||||
|
nixosSystem' =
|
||||||
|
{ nixpkgs ? inputs.nixos
|
||||||
|
, modules
|
||||||
|
, extraArgs ? { }
|
||||||
|
, specialArgs ? { }
|
||||||
|
, system ? "x86_64-linux"
|
||||||
|
}@args:
|
||||||
|
|
||||||
|
{ inherit args; } // nixpkgs.lib.nixosSystem {
|
||||||
|
inherit specialArgs system;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
({ ... }: {
|
||||||
|
_module.args = extraArgs // {
|
||||||
|
inherit hostRegistry inputs zentralwerk;
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs = {
|
||||||
|
overlays = [ self.overlays ];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
self.nixosModules.c3d2
|
||||||
|
./modules/audio-server.nix
|
||||||
|
./modules/c3d2.nix
|
||||||
|
./modules/stats.nix
|
||||||
|
./modules/pi-sensors.nix
|
||||||
|
] ++ modules;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
overlays = import ./overlays {
|
overlays = import ./overlays {
|
||||||
inherit nixos-unstable;
|
inherit nixos-unstable;
|
||||||
|
@ -216,31 +248,7 @@
|
||||||
|
|
||||||
packages = import ./packages.nix { inherit hostRegistry inputs lib microvm secrets self; };
|
packages = import ./packages.nix { inherit hostRegistry inputs lib microvm secrets self; };
|
||||||
|
|
||||||
nixosConfigurations = let
|
nixosConfigurations = {
|
||||||
nixosSystem' =
|
|
||||||
# Our custom NixOS builder
|
|
||||||
{ nixpkgs ? inputs.nixos, modules, extraArgs ? {}, specialArgs ? { }, system ? "x86_64-linux" }:
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
inherit specialArgs system;
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
({ ... }: {
|
|
||||||
_module.args = extraArgs // {
|
|
||||||
inherit hostRegistry inputs zentralwerk;
|
|
||||||
};
|
|
||||||
nixpkgs = {
|
|
||||||
overlays = [ self.overlays ];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
||||||
self.nixosModules.c3d2
|
|
||||||
./modules/audio-server.nix
|
|
||||||
./modules/c3d2.nix
|
|
||||||
./modules/stats.nix
|
|
||||||
./modules/pi-sensors.nix
|
|
||||||
] ++ modules;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
auth = nixosSystem' {
|
auth = nixosSystem' {
|
||||||
modules = [
|
modules = [
|
||||||
self.nixosModules.microvm
|
self.nixosModules.microvm
|
||||||
|
@ -501,7 +509,7 @@
|
||||||
|
|
||||||
mobilizon = nixosSystem' {
|
mobilizon = nixosSystem' {
|
||||||
# TODO: pending https://github.com/NixOS/nixpkgs/pull/119132
|
# TODO: pending https://github.com/NixOS/nixpkgs/pull/119132
|
||||||
nixpkgs = inputs.nixpkgs-mobilizon;
|
nixpkgs = inputs.nixos-mobilizon;
|
||||||
modules = [
|
modules = [
|
||||||
self.nixosModules.microvm
|
self.nixosModules.microvm
|
||||||
./hosts/mobilizon
|
./hosts/mobilizon
|
||||||
|
@ -757,22 +765,20 @@
|
||||||
|
|
||||||
hydraJobs =
|
hydraJobs =
|
||||||
lib.mapAttrs (_: nixos.lib.hydraJob) (
|
lib.mapAttrs (_: nixos.lib.hydraJob) (
|
||||||
lib.mapAttrs (_: nixosSystem:
|
let
|
||||||
nixosSystem.config.microvm.declaredRunner or nixosSystem.config.system.build.toplevel
|
getBuildEntryPoint = _: nixosSystem: nixosSystem.config.microvm.declaredRunner or nixosSystem.config.system.build.toplevel;
|
||||||
) self.nixosConfigurations
|
in
|
||||||
|
lib.mapAttrs getBuildEntryPoint self.nixosConfigurations
|
||||||
// lib.mapAttrs' (hostname: nixosSystem: lib.nameValuePair
|
// lib.mapAttrs' (hostname: nixosSystem: lib.nameValuePair
|
||||||
(hostname + "-simd")
|
(hostname + "-simd")
|
||||||
(nixosSystem.config.microvm.declaredRunner or nixosSystem.config.system.build.toplevel hostname
|
(getBuildEntryPoint null (nixosSystem' (nixosSystem.args // (with nixosSystem.args; {
|
||||||
(nixosSystem (nixosSystem.args // (with nixosSystem.args; {
|
modules = modules ++ [
|
||||||
hostname = hostname + "-simd";
|
{
|
||||||
modules = modules ++ [
|
c3d2.simd.enable = lib.mkForce true;
|
||||||
{
|
}
|
||||||
sandro.simd.enable = lib.mkForce true;
|
];
|
||||||
}
|
nixpkgs = nixos-unstable-simd;
|
||||||
];
|
}))))
|
||||||
inherit (inputs) nixpkgs;
|
|
||||||
})))
|
|
||||||
)
|
|
||||||
) self.nixosConfigurations
|
) self.nixosConfigurations
|
||||||
// nixos.lib.filterAttrs (name: attr:
|
// nixos.lib.filterAttrs (name: attr:
|
||||||
(builtins.match ".+-tftproot" name != null && lib.isDerivation attr)
|
(builtins.match ".+-tftproot" name != null && lib.isDerivation attr)
|
||||||
|
|
Loading…
Reference in New Issue