add renamed options for guided migration
This commit is contained in:
parent
133ddbbd7b
commit
b8b940e9ff
3 changed files with 27 additions and 0 deletions
|
|
@ -304,6 +304,9 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
(lib.mkRenamedOptionModule [ "shb" "ldap" ] [ "shb" "lldap" ])
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
|
|
|
|||
|
|
@ -346,6 +346,18 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
(lib.mkRemovedOptionModule [ "shb" "forgejo" "adminPassword" ] ''Instead, define an admin user in shb.forgejo.users and give it the same password, like so:
|
||||
shb.forgejo.users = {
|
||||
"forgejoadmin" = {
|
||||
isAdmin = true;
|
||||
email = "forgejoadmin@example.com";
|
||||
password.result = <path/to/password>;
|
||||
};
|
||||
};
|
||||
'')
|
||||
];
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.enable {
|
||||
services.forgejo = {
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ in
|
|||
|
||||
admin = lib.mkOption {
|
||||
description = "Default admin user info. Only needed if LDAP or SSO is not configured.";
|
||||
default = null;
|
||||
type = types.nullOr (types.submodule {
|
||||
options = {
|
||||
username = lib.mkOption {
|
||||
|
|
@ -253,7 +254,18 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
(lib.mkRenamedOptionModule [ "shb" "jellyfin" "adminPassword" ] [ "shb" "jellyfin" "admin" "password" ])
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = (!cfg.ldap.enable && !cfg.sso.enable) -> cfg.admin != null;
|
||||
message = "Jellyfin admin user must be configured with shb.jellyfin.admin if LDAP or SSO integration are not configured.";
|
||||
}
|
||||
];
|
||||
|
||||
services.jellyfin.enable = true;
|
||||
|
||||
networking.firewall = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue