modules: services: paperless: add admin password

This is a fallback in case SSO stops working...
This commit is contained in:
Bruno BELANYI 2021-08-30 20:37:18 +02:00
parent 5ae7b593e4
commit 52706ab4c4

View file

@ -34,6 +34,12 @@ in
example = "username"; example = "username";
description = "Name of the administrator"; description = "Name of the administrator";
}; };
passwordFile = mkOption {
type = types.str;
example = "/var/lib/paperless/password.txt";
description = "Read the administrator's password from this path";
};
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -70,6 +76,9 @@ in
PAPERLESS_TIME_ZONE = config.time.timeZone; PAPERLESS_TIME_ZONE = config.time.timeZone;
PAPERLESS_ADMIN_USER = cfg.username; PAPERLESS_ADMIN_USER = cfg.username;
}; };
# Admin password
passwordFile = cfg.passwordFile;
}; };
# Set-up database # Set-up database