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

25 lines
648 B
Nix
Raw Normal View History

2019-04-19 03:11:51 +02:00
{ pkgs, lib, config, ... }:
with lib;
let cfg = config.niveum.dropbox;
in {
2019-04-19 03:11:51 +02:00
options.niveum.dropbox = {
enable = mkEnableOption "Dropbox";
};
config = mkIf cfg.enable {
systemd.user.services.dropbox = {
2019-06-08 14:56:11 +02:00
description = "Dropbox synchronisation service";
after = [ "network.target" ];
wantedBy = [ "default.target" ];
path = [ pkgs.dropbox-cli ];
2019-06-08 14:56:11 +02:00
serviceConfig = {
Type = "forking";
PIDFile = "%h/.dropbox/dropbox.pid";
2019-06-08 14:56:11 +02:00
Restart = "always";
ExecStart = "${pkgs.dropbox-cli}/bin/dropbox start";
ExecStop = "${pkgs.dropbox-cli}/bin/dropbox stop";
2019-06-08 14:56:11 +02:00
};
};
2019-04-19 03:11:51 +02:00
};
}