First version.
This commit is contained in:
parent
c36768018a
commit
6a849d71d0
7 changed files with 556 additions and 4 deletions
45
modules/default.nix
Normal file
45
modules/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ pkgs, ... }: {
|
||||
systemd.services =
|
||||
let
|
||||
service-1 = "service-1";
|
||||
service-2 = "service-2";
|
||||
in
|
||||
{
|
||||
${service-1} = {
|
||||
enable = true;
|
||||
description = service-1;
|
||||
wants = [ "network-online.target" ];
|
||||
after = [
|
||||
"network-online.target"
|
||||
"avahi-daemon.service"
|
||||
"chrony.service"
|
||||
"nss-lookup.target"
|
||||
"tinc.service"
|
||||
"pulseaudio.service"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
script = ''
|
||||
true
|
||||
'';
|
||||
ExecReload = "true";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
${service-2} = {
|
||||
enable = true;
|
||||
description = service-2;
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
};
|
||||
partOf = [ "${service-1}.service" ];
|
||||
wantedBy = [ "${service-1}.service" ];
|
||||
|
||||
script = ''
|
||||
true
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue