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/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-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
|
2020-04-22 17:42:45 +02:00
|
|
|
system.activationScripts.home-symlinks = ''
|
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-10-27 12:02:31 +01:00
|
|
|
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Wiki ${config.users.users.me.home}/notes
|
2020-04-22 17:42:45 +02:00
|
|
|
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Uni ${config.users.users.me.home}/uni
|
|
|
|
|
'';
|
|
|
|
|
|
2020-10-24 13:26:39 +02:00
|
|
|
home-manager.users.me = {
|
|
|
|
|
services.nextcloud-client.enable = true;
|
|
|
|
|
};
|
2020-08-26 11:32:33 +02:00
|
|
|
|
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 {
|
2020-09-24 19:25:47 +02:00
|
|
|
cert = toString <system-secrets/syncthing/cert.pem>;
|
|
|
|
|
key = toString <system-secrets/syncthing/key.pem>;
|
2019-10-24 09:07:49 +02:00
|
|
|
devices = {
|
2020-06-10 17:37:25 +02:00
|
|
|
wilde.id =
|
|
|
|
|
"R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
|
|
|
|
heym.id =
|
|
|
|
|
"HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
|
2020-11-05 21:28:23 +01:00
|
|
|
manakish.id =
|
|
|
|
|
"AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
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 {
|
2020-11-09 09:39:37 +01:00
|
|
|
"${syncthing-dir}/common".devices = [ "wilde" "manakish" ];
|
2020-06-10 17:37:25 +02:00
|
|
|
"${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
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|