Set user services using a direct assignment
This commit is contained in:
parent
66d6880750
commit
7fdac59f45
1 changed files with 23 additions and 21 deletions
|
@ -14,30 +14,32 @@
|
|||
systemd.user = lib.optionalAttrs cfg.enable {
|
||||
enable = true;
|
||||
|
||||
services.rclone = {
|
||||
Unit = {
|
||||
Description = "rclone Starter";
|
||||
Documentation = "man:rclone(1)";
|
||||
};
|
||||
services = {
|
||||
rclone = {
|
||||
Unit = {
|
||||
Description = "rclone Starter";
|
||||
Documentation = "man:rclone(1)";
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
Service = {
|
||||
Type = "simple";
|
||||
|
||||
ExecStartPre =
|
||||
let
|
||||
script = pkgs.writeShellScriptBin "rclone-pre" ''
|
||||
sleep 10
|
||||
'';
|
||||
in
|
||||
(lib.getExe script);
|
||||
ExecStartPre =
|
||||
let
|
||||
script = pkgs.writeShellScriptBin "rclone-pre" ''
|
||||
sleep 10
|
||||
'';
|
||||
in
|
||||
(lib.getExe script);
|
||||
|
||||
ExecStart =
|
||||
let
|
||||
script = pkgs.writeShellScriptBin "rclone" ''
|
||||
systemctl --user start rclone.target
|
||||
'';
|
||||
in
|
||||
(lib.getExe script);
|
||||
ExecStart =
|
||||
let
|
||||
script = pkgs.writeShellScriptBin "rclone" ''
|
||||
systemctl --user start rclone.target
|
||||
'';
|
||||
in
|
||||
(lib.getExe script);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue