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 =
|
images =
|
||||||
forAllSystems (system:
|
forAllSystems (system:
|
||||||
let
|
let
|
||||||
images' = lib'.filterAttrs (host: metadata: lib'.elem system metadata.systems) images;
|
images' = lib'.filterAttrs (host: metadata: system == metadata._system) images;
|
||||||
in
|
in
|
||||||
lib'.mapAttrs
|
lib'.mapAttrs'
|
||||||
(host: metadata:
|
(host: metadata:
|
||||||
let
|
let
|
||||||
inherit system;
|
inherit system;
|
||||||
|
name = metadata._name;
|
||||||
nixpkgs-channel = metadata.nixpkgs-channel or "nixpkgs";
|
nixpkgs-channel = metadata.nixpkgs-channel or "nixpkgs";
|
||||||
pkgs = import inputs."${nixpkgs-channel}" { inherit system overlays; };
|
pkgs = import inputs."${nixpkgs-channel}" { inherit system overlays; };
|
||||||
format = metadata.format or "iso";
|
format = metadata.format or "iso";
|
||||||
in
|
in
|
||||||
mkImage {
|
lib'.nameValuePair name (mkImage {
|
||||||
inherit format system pkgs extraArgs;
|
inherit format system pkgs extraArgs;
|
||||||
extraModules = [
|
extraModules = [
|
||||||
({ lib, ... }: {
|
({ lib, ... }: {
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{ networking.hostName = lib.mkForce metadata.hostname or host; }
|
{ networking.hostName = lib.mkForce metadata.hostname or name; }
|
||||||
|
|
||||||
(lib.mkIf (metadata ? domain)
|
(lib.mkIf (metadata ? domain)
|
||||||
{ networking.domain = lib.mkForce metadata.domain; })
|
{ networking.domain = lib.mkForce metadata.domain; })
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
hostSharedConfig
|
hostSharedConfig
|
||||||
./hosts/${host}
|
./hosts/${name}
|
||||||
];
|
];
|
||||||
})
|
}))
|
||||||
images');
|
images');
|
||||||
|
|
||||||
# My several development shells for usual type of projects. This is much
|
# My several development shells for usual type of projects. This is much
|
||||||
|
Loading…
Reference in New Issue
Block a user