2020-06-10 17:37:25 +02:00
|
|
|
{ config, lib, pkgs, ... }: {
|
2019-04-19 03:11:51 +02:00
|
|
|
imports = [
|
2019-10-26 13:43:30 +02:00
|
|
|
<niveum/modules/seafile.nix>
|
|
|
|
|
<niveum/modules/google-drive.nix>
|
|
|
|
|
<niveum/modules/dropbox.nix>
|
2019-04-19 03:11:51 +02:00
|
|
|
];
|
|
|
|
|
|
2019-11-19 08:43:14 +01:00
|
|
|
niveum = {
|
2019-12-08 22:37:16 +01:00
|
|
|
dropbox.enable = true;
|
|
|
|
|
seafile.enable = true;
|
2019-12-09 08:05:14 +01:00
|
|
|
google-drive = {
|
2019-11-19 08:43:14 +01:00
|
|
|
enable = true;
|
2019-12-09 08:05:14 +01:00
|
|
|
directory = "${config.users.users.me.home}/cloud/gdrive";
|
2019-11-19 08:43:14 +01:00
|
|
|
};
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
|
2020-04-22 17:42:45 +02:00
|
|
|
system.activationScripts.home-symlinks = ''
|
|
|
|
|
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/daybook ${config.users.users.me.home}/daybook
|
2020-05-08 11:47:48 +02:00
|
|
|
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/mahlzeit ${config.users.users.me.home}/mahlzeit
|
2020-04-22 17:42:45 +02:00
|
|
|
ln -sfn ${config.users.users.me.home}/cloud/Dropbox/notes ${config.users.users.me.home}/notes
|
|
|
|
|
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Uni ${config.users.users.me.home}/uni
|
|
|
|
|
'';
|
|
|
|
|
|
2020-08-26 11:32:33 +02:00
|
|
|
environment.systemPackages = [ pkgs.nextcloud-client ];
|
|
|
|
|
|
2019-04-19 03:11:51 +02:00
|
|
|
services.syncthing = rec {
|
|
|
|
|
enable = true;
|
2019-05-29 17:23:38 +02:00
|
|
|
user = "kfm";
|
2019-04-19 03:11:51 +02:00
|
|
|
openDefaultPorts = true;
|
2019-05-29 17:23:38 +02:00
|
|
|
configDir = "/home/kfm/.config/syncthing";
|
|
|
|
|
dataDir = "/home/kfm/.config/syncthing";
|
2019-10-24 09:07:49 +02:00
|
|
|
declarative = rec {
|
|
|
|
|
cert = toString <secrets/syncthing/cert.pem>;
|
|
|
|
|
key = toString <secrets/syncthing/key.pem>;
|
|
|
|
|
devices = {
|
2020-06-10 17:37:25 +02:00
|
|
|
homeros.id =
|
|
|
|
|
"HSOL72W-MMN346W-C3WCWCH-OTRKJYG-MY2WWV6-P7JUHN7-5WYYYRV-ZMH4KAA";
|
|
|
|
|
scardanelli.id =
|
|
|
|
|
"7CZYHEX-3CSFDQU-PEEMYHG-6XGQ2ZD-KGVUWH5-GFRB2XK-FP57ERX-7APZUQU";
|
|
|
|
|
rilke.id =
|
|
|
|
|
"NYNNHXP-7JMSTXG-SVNOPWD-RWXCCCL-CBOVBEI-X4QPLF4-NJA5G2P-RSGYRQQ";
|
|
|
|
|
wilde.id =
|
|
|
|
|
"R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
|
|
|
|
heym.id =
|
|
|
|
|
"HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
|
2019-10-24 09:07:49 +02:00
|
|
|
};
|
2020-06-10 17:37:25 +02:00
|
|
|
folders =
|
|
|
|
|
let syncthing-dir = "${config.users.users.me.home}/cloud/syncthing";
|
|
|
|
|
in {
|
|
|
|
|
"${syncthing-dir}/common".devices =
|
|
|
|
|
[ "homeros" "scardanelli" "wilde" ];
|
|
|
|
|
"${syncthing-dir}/library".devices = lib.attrNames devices;
|
|
|
|
|
"${syncthing-dir}/mundoiu".devices = lib.attrNames devices;
|
|
|
|
|
"${syncthing-dir}/music".devices = lib.attrNames devices;
|
|
|
|
|
};
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|