Add an assertion to make sure that the services passed to systemd-manager exist.
This commit is contained in:
parent
542f0fea95
commit
19edbdddb1
1 changed files with 21 additions and 9 deletions
|
|
@ -24,15 +24,27 @@
|
||||||
};
|
};
|
||||||
system.stateVersion = lib.mkDefault lib.trivial.release;
|
system.stateVersion = lib.mkDefault lib.trivial.release;
|
||||||
|
|
||||||
assertions = lib.flip map config.system-manager.etcFiles (entry:
|
assertions =
|
||||||
{
|
lib.flip map config.system-manager.etcFiles
|
||||||
assertion = lib.hasAttr entry config.environment.etc;
|
(entry:
|
||||||
message = lib.concatStringsSep " " [
|
{
|
||||||
"The entry ${entry} that was passed to system-manager.etcFiles"
|
assertion = lib.hasAttr entry config.environment.etc;
|
||||||
"is not present in environment.etc"
|
message = lib.concatStringsSep " " [
|
||||||
];
|
"The entry ${entry} that was passed to system-manager.etcFiles"
|
||||||
}
|
"is not present in environment.etc"
|
||||||
);
|
];
|
||||||
|
}
|
||||||
|
) ++
|
||||||
|
lib.flip map config.system-manager.services
|
||||||
|
(entry:
|
||||||
|
{
|
||||||
|
assertion = lib.hasAttr entry config.systemd.services;
|
||||||
|
message = lib.concatStringsSep " " [
|
||||||
|
"The entry ${entry} that was passed to system-manager.services"
|
||||||
|
"is not present in systemd.services"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
# Add the system directory for systemd
|
# Add the system directory for systemd
|
||||||
system-manager.etcFiles = [ "systemd/system" ];
|
system-manager.etcFiles = [ "systemd/system" ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue