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,7 +24,9 @@
|
|||
};
|
||||
system.stateVersion = lib.mkDefault lib.trivial.release;
|
||||
|
||||
assertions = lib.flip map config.system-manager.etcFiles (entry:
|
||||
assertions =
|
||||
lib.flip map config.system-manager.etcFiles
|
||||
(entry:
|
||||
{
|
||||
assertion = lib.hasAttr entry config.environment.etc;
|
||||
message = lib.concatStringsSep " " [
|
||||
|
|
@ -32,6 +34,16 @@
|
|||
"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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue