dotfiles/modules/services/diskstation/default.nix

42 lines
931 B
Nix
Raw Normal View History

2021-09-14 23:01:04 +02:00
{ config, lib, pkgs, ... }:
{
services.davfs2 = {
enable = true;
extraConfig = "trust_server_cert diskstation.pem";
};
services.autofs = {
enable = true;
autoMaster =
let
mapConf = pkgs.writeText "auto" ''
keepass -fstype=davfs,uid=1000 :https\://davs.home.boehmies.de/home/Drive/
2021-09-14 23:04:13 +02:00
diskstation -fstype=davfs,uid=1000 :https\://192.168.0.2\:5006/home/Drive/
2021-09-14 23:01:04 +02:00
'';
in
2021-09-15 00:41:46 +02:00
''
/auto file:${mapConf}
'';
2021-09-14 23:01:04 +02:00
debug = true;
};
2021-09-14 23:04:13 +02:00
environment.etc."davfs2/certs/diskstation.pem" = {
text = builtins.readFile ./diskstation.pem;
};
2021-09-14 23:01:04 +02:00
home-manager.users.moritz = {
services.unison = {
enable = true;
pairs = {
keepass.roots = [
"/home/moritz/Keepass"
"/auto/keepass"
];
diskstation.roots = [
"/home/moritz/Documents"
"/auto/diskstation"
];
};
};
};
}