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

wip: flakes

This commit is contained in:
2021-12-29 10:24:47 +01:00
parent d5087c40b2
commit 06c1be9e09
22 changed files with 290 additions and 192 deletions

View File

@@ -1,29 +0,0 @@
{ pkgs, lib, config, ... }:
with lib;
let cfg = config.niveum.dropbox;
in {
options.niveum.dropbox = { enable = mkEnableOption "Dropbox"; };
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.dropbox-cli ];
networking.firewall = {
allowedTCPPorts = [ 17500 ];
allowedUDPPorts = [ 17500 ];
};
systemd.user.services.dropbox = {
description = "Dropbox synchronisation service";
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${pkgs.dropbox.out}/bin/dropbox";
ExecReload = "${pkgs.coreutils.out}/bin/kill -HUP $MAINPID";
KillMode = "control-group"; # upstream recommends process
Restart = "on-failure";
PrivateTmp = true;
ProtectSystem = "full";
Nice = 10;
};
};
};
}