mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
24 lines
587 B
Nix
24 lines
587 B
Nix
{ pkgs, config, lib, ... }:
|
|
with lib;
|
|
let cfg = config.niveum.seafile;
|
|
in {
|
|
options.niveum.seafile = {
|
|
enable = mkEnableOption "Seafile";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
systemd.user.services.seafile = {
|
|
description = "Seafile synchronisation service";
|
|
after = [ "network.target" ];
|
|
wantedBy = [ "default.target" ];
|
|
script = "${pkgs.seafile-client}/bin/seafile-applet";
|
|
serviceConfig = {
|
|
Type = "forking";
|
|
Restart = "always";
|
|
};
|
|
};
|
|
|
|
environment.systemPackages = [ pkgs.seafile-client pkgs.seafile-shared ];
|
|
};
|
|
}
|