mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
23 lines
642 B
Nix
23 lines
642 B
Nix
{ pkgs, lib, config, ... }:
|
|
with lib;
|
|
let cfg = config.niveum.dropbox;
|
|
in {
|
|
options.niveum.dropbox = { enable = mkEnableOption "Dropbox"; };
|
|
|
|
config = mkIf cfg.enable {
|
|
systemd.user.services.dropbox = {
|
|
description = "Dropbox synchronisation service";
|
|
after = [ "network.target" ];
|
|
wantedBy = [ "default.target" ];
|
|
path = [ pkgs.dropbox-cli ];
|
|
serviceConfig = {
|
|
Type = "forking";
|
|
PIDFile = "%h/.dropbox/dropbox.pid";
|
|
Restart = "always";
|
|
ExecStart = "${pkgs.dropbox-cli}/bin/dropbox start";
|
|
ExecStop = "${pkgs.dropbox-cli}/bin/dropbox stop";
|
|
};
|
|
};
|
|
};
|
|
}
|