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

24 lines
603 B
Nix
Raw Permalink Normal View History

2019-04-19 03:11:51 +02:00
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.niveum.seafile;
in {
options.niveum.seafile = {
enable = mkEnableOption "Seafile";
2019-06-08 14:57:22 +02:00
user = mkOption { type = types.attrs; };
2019-04-19 03:11:51 +02:00
};
config = lib.mkIf cfg.enable {
2019-06-08 14:57:22 +02:00
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;
};
};
2019-04-19 03:11:51 +02:00
environment.systemPackages = [ pkgs.seafile-client pkgs.seafile-shared ];
};
}