working keepass mount

nixos
Moritz Böhme 2021-09-14 14:23:16 +02:00
parent a4c9c5d8e3
commit 5514172c4a
5 changed files with 22 additions and 2 deletions

View File

@ -5,4 +5,9 @@
inputs.agenix.defaultPackage.x86_64-linux
];
age.secrets.nordvpn.file = ../secrets/nordvpn.age;
age.secrets.davfs = {
file = ../secrets/davfs.age;
mode = "600";
path = "/etc/davfs2/secrets";
};
}

View File

@ -8,6 +8,7 @@
./polybar
./rofi
./agenix.nix
./diskstation.nix
./git.nix
./kitty.nix
./picom.nix

View File

@ -2,15 +2,28 @@
{
services.davfs2.enable = true;
services.autofs = {
enable = true;
autoMaster =
let
mapConf = pkgs.writeText "auto" ''
keepass -fstype=favfs,conf=
keepass -fstype=davfs,uid=1000 :https\://davs.home.boehmies.de/home/Drive/
'';
in
''
/auto file:${mapConf}
'';
debug = true;
};
home-manager.users.moritz = {
services.unison = {
enable = true;
pairs.keepass.roots = [
"/home/moritz/Keepass"
"/auto/keepass"
];
};
};
}

BIN
secrets/davfs.age Normal file

Binary file not shown.

View File

@ -7,4 +7,5 @@ let
in
{
"nordvpn.age".publicKeys = users ++ hosts;
"davfs.age".publicKeys = users ++ hosts;
}