weilite/webdav: init
This commit is contained in:
parent
ea47988011
commit
1c01174df4
4 changed files with 47 additions and 12 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";
|
||||
|
|
|
@ -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