Set user services using a direct assignment

This commit is contained in:
Manuel Thalmann 2024-05-14 12:47:20 +02:00
parent 66d6880750
commit 7fdac59f45

View file

@ -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);
};
};
};