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/dropbox.nix>
|
2019-04-19 03:11:51 +02:00
|
|
|
];
|
|
|
|
|
|
2019-11-19 08:43:14 +01:00
|
|
|
niveum = {
|
2021-07-25 09:48:43 +02:00
|
|
|
dropbox.enable = false;
|
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 = {
|
2022-01-08 10:18:33 +01:00
|
|
|
services.nextcloud-client = {
|
|
|
|
|
enable = true;
|
|
|
|
|
startInBackground = true;
|
|
|
|
|
};
|
2020-10-24 13:26:39 +02:00
|
|
|
};
|
2020-08-26 11:32:33 +02:00
|
|
|
|
2021-11-19 13:40:32 +01:00
|
|
|
environment.systemPackages = [
|
2021-11-20 09:39:27 +01:00
|
|
|
(pkgs.writers.writeDashBin "book" ''
|
2021-11-19 13:40:32 +01:00
|
|
|
set -efu
|
|
|
|
|
book="$({
|
|
|
|
|
${pkgs.findutils}/bin/find ${config.users.users.me.home}/cloud/syncthing/library -type f
|
|
|
|
|
${pkgs.findutils}/bin/find ${config.users.users.me.home}/cloud/Seafile/Books -type f
|
|
|
|
|
} | ${pkgs.fzf}/bin/fzf)"
|
|
|
|
|
${pkgs.zathura}/bin/zathura "$book"
|
|
|
|
|
'')
|
|
|
|
|
];
|
|
|
|
|
|
2021-09-18 15:53:21 +02:00
|
|
|
fileSystems."/media/moodle" = {
|
|
|
|
|
device = "zaatar.r:/moodle";
|
|
|
|
|
fsType = "nfs";
|
|
|
|
|
options = [
|
|
|
|
|
"x-systemd.idle-timeout=600"
|
|
|
|
|
"noauto"
|
|
|
|
|
"x-systemd.automount"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
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";
|
2021-12-01 17:38:47 +01:00
|
|
|
cert = toString <system-secrets/syncthing/cert.pem>;
|
|
|
|
|
key = toString <system-secrets/syncthing/key.pem>;
|
|
|
|
|
inherit ((import <niveum/lib>).syncthing) devices;
|
|
|
|
|
folders =
|
|
|
|
|
let cloud-dir = "${config.users.users.me.home}/cloud";
|
|
|
|
|
in {
|
|
|
|
|
"${cloud-dir}/syncthing/common".devices = [ "kabsa" "manakish" ];
|
|
|
|
|
"${cloud-dir}/syncthing/library".devices = [ "kabsa" "manakish" "heym" ];
|
|
|
|
|
"${cloud-dir}/syncthing/mundoiu".devices = [ "kabsa" "manakish" "heym" ];
|
|
|
|
|
"${cloud-dir}/syncthing/music" = {
|
|
|
|
|
devices = [ "kabsa" "manakish" "heym" "zaatar" ];
|
|
|
|
|
id = "music";
|
2020-06-10 17:37:25 +02:00
|
|
|
};
|
2021-12-01 17:38:47 +01:00
|
|
|
};
|
2019-04-19 03:11:51 +02:00
|
|
|
};
|
|
|
|
|
}
|