working keepass mount

This commit is contained in:
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

@ -1,16 +1,29 @@
{ config, lib, pkgs, ... }:
{
services.davfs2.enable = true;
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;
}