mirror of
https://github.com/kmein/niveum
synced 2026-03-19 19:41:08 +01:00
~ dropbox with systemd
This commit is contained in:
@@ -7,7 +7,10 @@
|
|||||||
<stockholm/krebs/3modules/syncthing.nix>
|
<stockholm/krebs/3modules/syncthing.nix>
|
||||||
];
|
];
|
||||||
|
|
||||||
niveum.dropbox.enable = true;
|
niveum.dropbox = {
|
||||||
|
enable = true;
|
||||||
|
user = config.users.users.me;
|
||||||
|
};
|
||||||
|
|
||||||
niveum.seafile.enable = true;
|
niveum.seafile.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,19 @@ in
|
|||||||
{
|
{
|
||||||
options.niveum.dropbox = {
|
options.niveum.dropbox = {
|
||||||
enable = mkEnableOption "Dropbox";
|
enable = mkEnableOption "Dropbox";
|
||||||
|
user = mkOption { type = types.attrs; };
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.xserver.displayManager.sessionCommands = "${pkgs.dropbox}/bin/dropbox &";
|
systemd.services.dropbox = {
|
||||||
|
description = "Dropbox synchronisation service";
|
||||||
|
after = [ "network-online.target" ];
|
||||||
|
script = "${pkgs.dropbox}/bin/dropbox";
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "always";
|
||||||
|
User = cfg.user.name;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.dropbox-cli ];
|
environment.systemPackages = [ pkgs.dropbox-cli ];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user