weilite/webdav: init
This commit is contained in:
parent
ea47988011
commit
2aa70255b2
5 changed files with 52 additions and 14 deletions
|
@ -102,6 +102,13 @@
|
|||
type = "virtiofs";
|
||||
options = "rw,nodev,nosuid";
|
||||
}
|
||||
{
|
||||
what = "originals";
|
||||
where = "/mnt/photos/xin/originals";
|
||||
type = "virtiofs";
|
||||
options = "rw,nodev,nosuid";
|
||||
wantedBy = [ "immich-server.service" ];
|
||||
}
|
||||
{
|
||||
what = "/mnt/nixos/ocis";
|
||||
where = "/var/lib/ocis";
|
||||
|
|
|
@ -12,6 +12,9 @@ sonarr:
|
|||
api-key: ENC[AES256_GCM,data:/CkApTCLQy8TLHGKSM1saacNi9uQDswAjshRSLJk1hg=,iv:PNX4BZLx7krs12lxgORMSarnt0c/ga8yPtoLSzbQ+sY=,tag:V1pp9OCtX5/5fbwLBMGlOQ==,type:str]
|
||||
radarr:
|
||||
api-key: ENC[AES256_GCM,data:AeJArngvgmqnxk2g13QjMa6XS893B+3ZdX2K8OqXRQg=,iv:NrQf3yyqRpHMeWQ3bpPH4fUDdo/x2uB6pQCq0ZrFP5c=,tag:Yj2PSy6zRfe8anW0RGuZAQ==,type:str]
|
||||
webdav:
|
||||
photosync:
|
||||
password: ENC[AES256_GCM,data:s+omleBtVALG5bpbTnlzbwBj0oCZX8Dm8IbcUV6COnI=,iv:vwCs3ujmCcE87rl91ZtOEAgSQF1/0t17/7/0UM4x8fE=,tag:ylw76CX9SCylWoJt86rmjg==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
|
@ -36,8 +39,8 @@ sops:
|
|||
V0thRjU4WGpQRGFpcnoxSjZTZHhTTkUKzNMHh9p7GUY3hL5XZ9S4x20CwaItsXFV
|
||||
RKujsFVVBd8Kuq/jyOCBTRCscuHI4LW/wYeZYHFEZFSTK2liAqspgw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-03-30T06:50:46Z"
|
||||
mac: ENC[AES256_GCM,data:o9mucckntBoKzO3+S1lWcvKeyolqlzYcRRWkosjLnJ7kY3S2ssYxdEz9PPBihpIU4z8ogy/TIuRjLV/XOiPyNUZy0a++2erfQjpr4YIc8KvivG9erE4S4YkNFCVOXv6XjQ7gypaYScX8pdhh0idkyuxJPb0N5HcB1Ngtx/bhrBY=,iv:YfFXYt0GGZsssyoImWKep0in0STGqgUgQ87v2g7E0MU=,tag:aMb/SDiboeRyCW9AItnhzw==,type:str]
|
||||
lastmodified: "2025-04-06T14:28:44Z"
|
||||
mac: ENC[AES256_GCM,data:tYAhkwRs2CFOUCw3Iuq6T5C+QkbpSz80fI6CP65VyFrNiej9hshmjngPnf8bFElF+bHI64a/zpo2y4CqV213011tOX2YYvLD5zrAQb18rBFUdJblY5wQyx/DXiPaIf5jK6WGHIRaOmqZJuqXKrQKnf99N12JydXjt6usBGGZr8M=,iv:wySf7lctw14iUbKo5fDu+p6TMY5QXGYYmBukh2qb19I=,tag:pZrnFiNZEK01pnDN0+1Rcw==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.4
|
||||
|
|
|
@ -7,5 +7,6 @@
|
|||
./immich.nix
|
||||
./jellyfin.nix
|
||||
./transmission.nix
|
||||
./webdav.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -86,16 +86,6 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
systemd.mounts = [
|
||||
{
|
||||
what = "originals";
|
||||
where = "/mnt/immich/external-library/xin";
|
||||
type = "virtiofs";
|
||||
options = "ro,nodev,nosuid";
|
||||
wantedBy = [ "immich-server.service" ];
|
||||
}
|
||||
];
|
||||
|
||||
systemd.timers.immich-auto-stack = {
|
||||
enable = true;
|
||||
wantedBy = [ "immich-server.service" ];
|
||||
|
@ -135,8 +125,8 @@ in
|
|||
|
||||
systemd.services.immich-server = {
|
||||
serviceConfig = {
|
||||
ReadWritePaths = [
|
||||
"/mnt/immich/external-library/xin"
|
||||
BindReadOnlyPaths = [
|
||||
"/mnt/photos/xin/originals:/mnt/immich/external-library/xin"
|
||||
];
|
||||
Environment = "IMMICH_CONFIG_FILE=${config.sops.templates."immich/config.json".path}";
|
||||
};
|
||||
|
|
37
machines/weilite/services/webdav.nix
Normal file
37
machines/weilite/services/webdav.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
|
||||
sops.secrets = {
|
||||
"webdav/photosync/password" = { };
|
||||
};
|
||||
|
||||
sops.templates."webdav.env" = {
|
||||
content = ''
|
||||
PHOTOSYNC_PASSWORD=${config.sops.placeholder."webdav/photosync/password"}
|
||||
'';
|
||||
};
|
||||
|
||||
services.webdav = {
|
||||
enable = true;
|
||||
settings = {
|
||||
permissions = "RC";
|
||||
behindProxy = true;
|
||||
users = [
|
||||
{
|
||||
username = "photosync";
|
||||
password = "{ENV}PHOTOSYNC_PASSWORD";
|
||||
}
|
||||
];
|
||||
};
|
||||
environmentFile = config.sops.templates."webdav.env".path;
|
||||
};
|
||||
|
||||
systemd.services.webdav.serviceConfig = {
|
||||
BindReadOnlyPaths = [
|
||||
"/mnt/photos/xin/originals:%t/webdav/photosync"
|
||||
];
|
||||
RuntimeDirectory = "webdav";
|
||||
WorkingDirectory = "%t/webdav";
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue