os/modules/nextcloud/nextcloud.service.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
600 B
Nix
Raw Normal View History

2021-05-30 19:10:28 +00:00
pkgs: {
Unit = {
Description = "Nextcloud Client";
BindsTo = ["sway-session.target"];
Wants = ["graphical-session-pre.target"];
After = ["graphical-session-pre.target"];
# ConditionEnvironment requires systemd v247 to work correctly
ConditionEnvironment = ["WAYLAND_DISPLAY"];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.nextcloud-client}/bin/nextcloud --background";
ExecReload = "/run/current-system/sw/bin/kill -HUP $MAINPID";
KillMode = "process";
Restart = "on-failure";
};
Install = {
WantedBy = ["sway-session.target"];
};
}