filebrowser: Init module

This commit is contained in:
SebastianStork 2025-09-02 16:32:28 +02:00
parent e782dff77b
commit e1066c2083

View file

@ -0,0 +1,39 @@
{
config,
inputs,
lib,
...
}:
let
cfg = config.custom.services.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;
};
};
config = lib.mkIf cfg.enable {
meta = {
domains.list = [ cfg.domain ];
ports.tcp.list = [ cfg.port ];
};
services.filebrowser = {
enable = true;
settings = {
inherit (cfg) port;
noauth = true;
};
};
};
}