postgresql: don't prepend postgresql- for states
This commit is contained in:
parent
3368255473
commit
7fb6c35de8
|
@ -97,6 +97,12 @@ in
|
|||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = name;
|
||||
description = "Database name.";
|
||||
};
|
||||
service = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = name;
|
||||
description = "Service name that we associate with the database.";
|
||||
};
|
||||
# set to false, in case the upstream module uses ensureDatabase option
|
||||
create.enable = lib.mkOption {
|
||||
|
@ -118,7 +124,7 @@ in
|
|||
restore.stopOnRestore = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = "List of services to stop before restoring the database.";
|
||||
description = "List of systemd services to stop before restoring the database.";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -160,7 +166,7 @@ in
|
|||
'';
|
||||
|
||||
clanCore.state = lib.mapAttrs' (
|
||||
_: db: lib.nameValuePair "postgresql-${db.name}" (createDatatbaseState db)
|
||||
_: db: lib.nameValuePair "${db.service}" (createDatatbaseState db)
|
||||
) config.clan.postgresql.databases;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user