1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00
Files
niveum/configs/cloud.nix

47 lines
1.5 KiB
Nix
Raw Normal View History

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
];
niveum = {
dropbox.enable = true;
seafile.enable = true;
2019-04-19 03:11:51 +02:00
};
system.activationScripts.home-symlinks = ''
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/mahlzeit ${config.users.users.me.home}/mahlzeit
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Wiki ${config.users.users.me.home}/notes
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";
declarative = rec {
2020-09-24 19:25:47 +02:00
cert = toString <system-secrets/syncthing/cert.pem>;
key = toString <system-secrets/syncthing/key.pem>;
inherit ((import <niveum/lib>).syncthing) devices;
2020-06-10 17:37:25 +02:00
folders =
let cloud-dir = "${config.users.users.me.home}/cloud";
2020-06-10 17:37:25 +02:00
in {
"${cloud-dir}/syncthing/common".devices = [ "wilde" "manakish" ];
"${cloud-dir}/syncthing/library".devices = [ "wilde" "manakish" "heym" ];
"${cloud-dir}/syncthing/mundoiu".devices = [ "wilde" "manakish" "heym" ];
"${cloud-dir}/syncthing/music".devices = [ "wilde" "manakish" "heym" ];
"${cloud-dir}/moodle" = {
devices = [ "wilde" "toum" "manakish" ];
id = "moodle-dl";
};
2020-06-10 17:37:25 +02:00
};
2019-04-19 03:11:51 +02:00
};
};
}