feat: dropbox
This commit is contained in:
@@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
tailscale.enable = true;
|
tailscale.enable = true;
|
||||||
|
|
||||||
|
dropbox.enable = true;
|
||||||
|
|
||||||
users.users = [
|
users.users = [
|
||||||
"crumb"
|
"crumb"
|
||||||
];
|
];
|
||||||
|
|||||||
33
modules/nixos/dropbox.nix
Normal file
33
modules/nixos/dropbox.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let cfg = config.sydnix.dropbox;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
sydnix.dropbox = {
|
||||||
|
enable = mkEnableOption "Dropbox";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [ pkgs.dropbox-cli ];
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -9,7 +9,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
homeConfiguration = { config, lib, pkgs, ... }: {
|
homeConfiguration = { config, lib, pkgs, ... }: {
|
||||||
imports = [ ./programs.nix ];
|
imports = [
|
||||||
|
./programs.nix
|
||||||
|
./files.nix
|
||||||
|
];
|
||||||
|
|
||||||
sydnix = {
|
sydnix = {
|
||||||
sops = {
|
sops = {
|
||||||
@@ -20,12 +23,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home.packages = [
|
||||||
packages = [
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Don't touch!
|
# Don't touch!
|
||||||
stateVersion = "18.09";
|
home.stateVersion = "18.09";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
24
users/crumb/files.nix
Normal file
24
users/crumb/files.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let mutableSymlink = config.lib.file.mkOutOfStoreSymlink;
|
||||||
|
in {
|
||||||
|
home.file."org".source =
|
||||||
|
mutableSymlink "~/Dropbox/org";
|
||||||
|
|
||||||
|
# HACK: This all ought to be subsumed by Impermanence.
|
||||||
|
|
||||||
|
home.file."Documents".source =
|
||||||
|
mutableSymlink "/persist/home/crumb/Documents";
|
||||||
|
|
||||||
|
home.file."Pictures".source =
|
||||||
|
mutableSymlink "/persist/home/crumb/Pictures";
|
||||||
|
|
||||||
|
home.file."src".source =
|
||||||
|
mutableSymlink "/persist/home/crumb/src";
|
||||||
|
|
||||||
|
home.file."Music".source =
|
||||||
|
mutableSymlink "/persist/home/crumb/Music";
|
||||||
|
|
||||||
|
home.file."Videos".source =
|
||||||
|
mutableSymlink "/persist/home/crumb/Videos";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user