diff options
author | boozedog <code@booze.dog> | 2023-04-12 17:46:47 -0400 |
---|---|---|
committer | Maciej Krüger <mkg20001@gmail.com> | 2023-12-26 11:56:25 +0100 |
commit | 0b522b2429c27eeadd8e928d8e1eca274df62c90 (patch) | |
tree | 2d3862fee6cb5377d3166ecb6733efad469f3aaf /nixos/modules/services/admin | |
parent | fc9790e5d92e965ca2d72faff7601af2c9dee9c4 (diff) |
nixos/pgadmin: add package option
Diffstat (limited to 'nixos/modules/services/admin')
-rw-r--r-- | nixos/modules/services/admin/pgadmin.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/services/admin/pgadmin.nix b/nixos/modules/services/admin/pgadmin.nix index 390c80d1a2d4..5eaa911e37f1 100644 --- a/nixos/modules/services/admin/pgadmin.nix +++ b/nixos/modules/services/admin/pgadmin.nix @@ -3,7 +3,6 @@ with lib; let - pkg = pkgs.pgadmin4; cfg = config.services.pgadmin; _base = with types; [ int bool str ]; @@ -36,6 +35,8 @@ in default = 5050; }; + package = mkPackageOptionMD pkgs "pgadmin4" { }; + initialEmail = mkOption { description = lib.mdDoc "Initial email for the pgAdmin account"; type = types.str; @@ -150,7 +151,7 @@ in echo "$PW" # Retype password: echo "$PW" - ) | ${pkg}/bin/pgadmin4-setup + ) | ${cfg.package}/bin/pgadmin4-setup ''; restartTriggers = [ @@ -162,7 +163,7 @@ in DynamicUser = true; LogsDirectory = "pgadmin"; StateDirectory = "pgadmin"; - ExecStart = "${pkg}/bin/pgadmin4"; + ExecStart = "${cfg.package}/bin/pgadmin4"; }; }; |