mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
~ seafile with systemd
This commit is contained in:
@@ -4,10 +4,19 @@ let cfg = config.niveum.seafile;
|
||||
in {
|
||||
options.niveum.seafile = {
|
||||
enable = mkEnableOption "Seafile";
|
||||
user = mkOption { type = types.attrs; };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.xserver.displayManager.sessionCommands = "${pkgs.seafile-client}/bin/seafile-applet &";
|
||||
systemd.services.seafile = {
|
||||
description = "Seafile synchronisation service";
|
||||
after = [ "network-online.target" ];
|
||||
script = "${pkgs.seafile-client}/bin/seafile-applet";
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
User = cfg.user.name;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.seafile-client pkgs.seafile-shared ];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user