1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00
Files
niveum/modules/dropbox.nix
2019-12-08 22:37:16 +01:00

25 lines
648 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";
};
};
};
}