mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
config: fix images export
This commit is contained in:
parent
e9ff0dc7fa
commit
f60d28ba2a
13
flake.nix
13
flake.nix
@ -394,31 +394,32 @@
|
||||
images =
|
||||
forAllSystems (system:
|
||||
let
|
||||
images' = lib'.filterAttrs (host: metadata: lib'.elem system metadata.systems) images;
|
||||
images' = lib'.filterAttrs (host: metadata: system == metadata._system) images;
|
||||
in
|
||||
lib'.mapAttrs
|
||||
lib'.mapAttrs'
|
||||
(host: metadata:
|
||||
let
|
||||
inherit system;
|
||||
name = metadata._name;
|
||||
nixpkgs-channel = metadata.nixpkgs-channel or "nixpkgs";
|
||||
pkgs = import inputs."${nixpkgs-channel}" { inherit system overlays; };
|
||||
format = metadata.format or "iso";
|
||||
in
|
||||
mkImage {
|
||||
lib'.nameValuePair name (mkImage {
|
||||
inherit format system pkgs extraArgs;
|
||||
extraModules = [
|
||||
({ lib, ... }: {
|
||||
config = lib.mkMerge [
|
||||
{ networking.hostName = lib.mkForce metadata.hostname or host; }
|
||||
{ networking.hostName = lib.mkForce metadata.hostname or name; }
|
||||
|
||||
(lib.mkIf (metadata ? domain)
|
||||
{ networking.domain = lib.mkForce metadata.domain; })
|
||||
];
|
||||
})
|
||||
hostSharedConfig
|
||||
./hosts/${host}
|
||||
./hosts/${name}
|
||||
];
|
||||
})
|
||||
}))
|
||||
images');
|
||||
|
||||
# My several development shells for usual type of projects. This is much
|
||||
|
Loading…
Reference in New Issue
Block a user