dropbox - 2
This commit is contained in:
@@ -14,11 +14,6 @@
|
|||||||
networking = {
|
networking = {
|
||||||
hostName = "eliasLaptop";
|
hostName = "eliasLaptop";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
# Needed for Dropbox.
|
|
||||||
firewall = {
|
|
||||||
allowedTCPPorts = [ 17500 ];
|
|
||||||
allowedUDPPorts = [ 17500 ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
@@ -90,27 +85,6 @@
|
|||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# Dropbox settings
|
|
||||||
systemd.user.services.dropbox = {
|
|
||||||
description = "Dropbox";
|
|
||||||
wantedBy = [ "graphical-session.target" ];
|
|
||||||
environment = {
|
|
||||||
QT_PLUGIN_PATH = "/run/current-system/sw/"
|
|
||||||
+ pkgs.qt5.qtbase.qtPluginPrefix;
|
|
||||||
QML2_IMPORT_PATH = "/run/current-system/sw/"
|
|
||||||
+ pkgs.qt5.qtbase.qtQmlPrefix;
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${lib.getBin pkgs.dropbox}/bin/dropbox";
|
|
||||||
ExecReload = "${lib.getBin pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
|
||||||
KillMode = "control-group"; # upstream recommends process
|
|
||||||
Restart = "on-failure";
|
|
||||||
PrivateTmp = true;
|
|
||||||
ProtectSystem = "full";
|
|
||||||
Nice = 10;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable zsh for setting it as shell for users.
|
# Enable zsh for setting it as shell for users.
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
|||||||
34
home/programs/dropbox/default.nix
Normal file
34
home/programs/dropbox/default.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# dropbox - we don't need this in the environment. systemd unit pulls it in
|
||||||
|
fq
|
||||||
|
dropbox-cli
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [ 17500 ];
|
||||||
|
allowedUDPPorts = [ 17500 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.dropbox = {
|
||||||
|
description = "Dropbox";
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
environment = {
|
||||||
|
QT_PLUGIN_PATH = "/run/current-system/sw/"
|
||||||
|
+ pkgs.qt5.qtbase.qtPluginPrefix;
|
||||||
|
QML2_IMPORT_PATH = "/run/current-system/sw/"
|
||||||
|
+ pkgs.qt5.qtbase.qtQmlPrefix;
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${lib.getBin pkgs.dropbox}/bin/dropbox";
|
||||||
|
ExecReload = "${lib.getBin pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
|
KillMode = "control-group"; # upstream recommends process
|
||||||
|
Restart = "on-failure";
|
||||||
|
PrivateTmp = true;
|
||||||
|
ProtectSystem = "full";
|
||||||
|
Nice = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user