Write generation state into a state file and restructure the services.json file produced by nix.
This commit is contained in:
parent
8f31818a27
commit
c3be9ceb19
6 changed files with 143 additions and 80 deletions
18
nix/lib.nix
18
nix/lib.nix
|
|
@ -18,16 +18,14 @@ in
|
|||
};
|
||||
|
||||
services =
|
||||
map
|
||||
(name:
|
||||
let
|
||||
serviceName = "${name}.service";
|
||||
in
|
||||
{
|
||||
name = serviceName;
|
||||
service = ''${nixosConfig.config.systemd.units."${serviceName}".unit}/${serviceName}'';
|
||||
})
|
||||
nixosConfig.config.service-manager.services;
|
||||
lib.listToAttrs
|
||||
(map
|
||||
(name:
|
||||
let
|
||||
serviceName = "${name}.service";
|
||||
in
|
||||
lib.nameValuePair serviceName { storePath = ''${nixosConfig.config.systemd.units."${serviceName}".unit}/${serviceName}''; })
|
||||
nixosConfig.config.service-manager.services);
|
||||
|
||||
servicesPath = pkgs.writeTextFile {
|
||||
name = "services";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue