1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/modules/seafile.nix
2019-06-08 14:57:22 +02:00

24 lines
603 B
Nix

{ pkgs, config, lib, ... }:
with lib;
let cfg = config.niveum.seafile;
in {
options.niveum.seafile = {
enable = mkEnableOption "Seafile";
user = mkOption { type = types.attrs; };
};
config = lib.mkIf cfg.enable {
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 ];
};
}