nixos/pgadmin: add package option
This commit is contained in:
parent
fc9790e5d9
commit
0b522b2429
1 changed files with 4 additions and 3 deletions
|
@ -3,7 +3,6 @@
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
pkg = pkgs.pgadmin4;
|
|
||||||
cfg = config.services.pgadmin;
|
cfg = config.services.pgadmin;
|
||||||
|
|
||||||
_base = with types; [ int bool str ];
|
_base = with types; [ int bool str ];
|
||||||
|
@ -36,6 +35,8 @@ in
|
||||||
default = 5050;
|
default = 5050;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
package = mkPackageOptionMD pkgs "pgadmin4" { };
|
||||||
|
|
||||||
initialEmail = mkOption {
|
initialEmail = mkOption {
|
||||||
description = lib.mdDoc "Initial email for the pgAdmin account";
|
description = lib.mdDoc "Initial email for the pgAdmin account";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
@ -150,7 +151,7 @@ in
|
||||||
echo "$PW"
|
echo "$PW"
|
||||||
# Retype password:
|
# Retype password:
|
||||||
echo "$PW"
|
echo "$PW"
|
||||||
) | ${pkg}/bin/pgadmin4-setup
|
) | ${cfg.package}/bin/pgadmin4-setup
|
||||||
'';
|
'';
|
||||||
|
|
||||||
restartTriggers = [
|
restartTriggers = [
|
||||||
|
@ -162,7 +163,7 @@ in
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
LogsDirectory = "pgadmin";
|
LogsDirectory = "pgadmin";
|
||||||
StateDirectory = "pgadmin";
|
StateDirectory = "pgadmin";
|
||||||
ExecStart = "${pkg}/bin/pgadmin4";
|
ExecStart = "${cfg.package}/bin/pgadmin4";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue