mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Rename web-service dir
This commit is contained in:
parent
b2680db359
commit
14fa3f89c1
18 changed files with 0 additions and 0 deletions
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
config,
|
||||
modulesPath,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.services.filebrowser;
|
||||
|
||||
dataDir = "/var/lib/filebrowser";
|
||||
in
|
||||
{
|
||||
imports = [ "${inputs.nixpkgs-unstable}/nixos/modules/services/web-apps/filebrowser.nix" ];
|
||||
|
||||
options.custom.services.filebrowser = {
|
||||
enable = lib.mkEnableOption "";
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
};
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 44093;
|
||||
};
|
||||
doBackups = lib.mkEnableOption "";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
warnings = lib.optional (lib.pathExists "${modulesPath}/services/web-apps/filebrowser.nix") "TODO: Use filebrowser module from stable nixpkgs";
|
||||
|
||||
meta = {
|
||||
domains.list = [ cfg.domain ];
|
||||
ports.tcp.list = [ cfg.port ];
|
||||
};
|
||||
|
||||
services.filebrowser = {
|
||||
enable = true;
|
||||
settings = {
|
||||
inherit (cfg) port;
|
||||
noauth = true;
|
||||
};
|
||||
};
|
||||
|
||||
custom = {
|
||||
services.resticBackups.filebrowser = lib.mkIf cfg.doBackups {
|
||||
conflictingService = "filebrowser.service";
|
||||
paths = [ dataDir ];
|
||||
};
|
||||
|
||||
persist.directories = [ dataDir ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue