diff --git a/nixos/hosts/wheatley/configuration.nix b/nixos/hosts/wheatley/configuration.nix index 10981e6..932d188 100644 --- a/nixos/hosts/wheatley/configuration.nix +++ b/nixos/hosts/wheatley/configuration.nix @@ -6,7 +6,11 @@ config, modulesPath, ... -}: { +}: let + davfsconf = pkgs.writeText "davfs.conf" '' + secrets ${config.sops.secrets."webdav-secret".path} + ''; +in { imports = [ # inputs.nixos-hardware.nixosModules.raspberry-pi-4 (modulesPath + "/installer/sd-card/sd-image-aarch64.nix") @@ -72,6 +76,21 @@ prowlarr.enable = true; }; + sops.secrets."webdav-secret".mode = "0600"; + sops.secrets."webdav-secret".owner = config.users.users.root.name; + + services.davfs2.enable = true; + services.autofs = { + enable = true; + autoMaster = let + mapConf = pkgs.writeText "auto" '' + nextcloud -fstype=davfs,conf=${davfsconf},uid=myuid :https\:nextcloud.gladtherescake.eu/remote.php/webdav/ + ''; + in '' + /home/directory/mounts file:${mapConf} + ''; + }; + #uses port 8096 services.jellyfin.enable = true; diff --git a/nixos/hosts/wheatley/secrets/sops.yaml b/nixos/hosts/wheatley/secrets/sops.yaml index 8892797..d89f8b9 100644 --- a/nixos/hosts/wheatley/secrets/sops.yaml +++ b/nixos/hosts/wheatley/secrets/sops.yaml @@ -2,6 +2,7 @@ wireless.env: ENC[AES256_GCM,data:a5sUW0Lc4GRd9aUJwHbmQvzvRB8WaRjMSQ==,iv:+3ncL3 lillian-password: ENC[AES256_GCM,data:GY7WyfLRc/q4fecnazWzfoZsruN/F0ar7mJ9RaqTHSb9K6xhEmifmJeqpR5xGIJYW6MYciCsZ9YmRsJbuSHTIlo9PrCTYBGvXg==,iv:bzml3abPox3RdvtKBQiBAcVXHUdGAn0ETMsDpBtT8T0=,tag:2iaBJ4hFFBUbonslTvQH5Q==,type:str] protonvpn-priv-key: ENC[AES256_GCM,data:s4LAq1Rqm+jGaK3OKcjIBCQYXPs3oEuTKJMAM+gFxIpZdwcJCIU7uyoCy6c=,iv:zoWv5u0xgJHldwdRGRv3bXI1kasaWQz1YD7wt0J890I=,tag:cFXnayZRq13UqP+XWuHnWw==,type:str] rpcSecret: ENC[AES256_GCM,data:3tCZk2csB/ofxPc6,iv:NwT6k1hh73moH6eErT23/Dvwgb1wP/qIuoxXnCgNSao=,tag:nh0mFsh9I4R1baCL1oH+AA==,type:str] +webdav-secret: ENC[AES256_GCM,data:SDFyHaE+HprkguOmDfnzwQ/n5OYgbTpxcVl4FGiLcsItefbSDOIQg5l01fqVB8zv+rRGlPcyRrIn7KTPrTpBx7X4RNHfFK4FKKvAANt6z0e5pu1+wnoObWxTShCFjfFoRCLkoh/j/CmLFyFIafrI7rzZUhs=,iv:stygLmNVWXkZL5A0J83CKPefRr7TqXeygQVLszr28eY=,tag:9hss2c77JELSASnwUyAF4w==,type:str] sops: kms: [] gcp_kms: [] @@ -17,8 +18,8 @@ sops: Vm9mWk5JRGtZNVVhN1JQWTBlb2kySkEKoLI1MzS3uGNUbyn7kI5DylKZiPtc1div bKIboWoobTfDt0EURfmZ5+JrX6DlZxRyNQyl9dsKmZT6pLdaIppStA== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-12-04T21:38:42Z" - mac: ENC[AES256_GCM,data:Jh3653a7+omGPQl36dbjM/iNjS9/v6oYH55qLchJ0YeqwXFwXPzw0O1AIhDPeFcevYzNaxO6yAN0Zc1dTXO4KFeNXvBp1yoP5rb6P3pZNDtFgKkedZ7KdoTYgdl//pjg2yp5epEejJEGs2pT+GbzlpoN2pZotkjMNq9+knSp/8c=,iv:f8fLJHerF3l/1XVuXH4IuaCowSft+TdfgiyG/AMCMH4=,tag:h61Jtq1Hvpa/EkXQP7MtQQ==,type:str] + lastmodified: "2024-12-04T22:37:22Z" + mac: ENC[AES256_GCM,data:sOC3EwlVuPXRNDY9mMkp5+qiPvRc439DD2r9pfjPThV0YXb/HqFIyHEdNJDzvAj1hm20Qp0I45A3Hy2hKI6AKKtY9B8/fMu9EMdtkmmWk5Iav4jTYd8bbVyegILFfxix2DNbRrR95qPqwfjrq3E47c/JuM7DVCwueS5d22rbNrs=,iv:gcrCQs1fHRfU2IQo/vJ2u2ITau7wn+Zo0L4AO9RZbCE=,tag:PCYsDxhAHjIglHMikg97+A==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.9.1