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 inputs.agenix.defaultPackage.x86_64-linux
]; ];
age.secrets.nordvpn.file = ../secrets/nordvpn.age; 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 ./polybar
./rofi ./rofi
./agenix.nix ./agenix.nix
./diskstation.nix
./git.nix ./git.nix
./kitty.nix ./kitty.nix
./picom.nix ./picom.nix

View file

@ -1,16 +1,29 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
services.davfs2.enable = true; services.davfs2.enable = true;
services.autofs = { services.autofs = {
enable = true;
autoMaster = autoMaster =
let let
mapConf = pkgs.writeText "auto" '' mapConf = pkgs.writeText "auto" ''
keepass -fstype=favfs,conf= keepass -fstype=davfs,uid=1000 :https\://davs.home.boehmies.de/home/Drive/
''; '';
in in
'' ''
/auto file:${mapConf} /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 in
{ {
"nordvpn.age".publicKeys = users ++ hosts; "nordvpn.age".publicKeys = users ++ hosts;
"davfs.age".publicKeys = users ++ hosts;
} }