Merge pull request #42424 from LumiGuide/remove-deprecated-postage

pgmanage: remove deprecated postage alias
This commit is contained in:
Daiderd Jordan 2018-06-24 13:19:18 +02:00 committed by GitHub
commit 4cd108043c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 43 deletions

View File

@ -41,7 +41,9 @@ let
pgmanage = "pgmanage"; pgmanage = "pgmanage";
pgmanageOptions = { in {
options.services.pgmanage = {
enable = mkEnableOption "PostgreSQL Administration for the web"; enable = mkEnableOption "PostgreSQL Administration for the web";
package = mkOption { package = mkOption {
@ -176,47 +178,29 @@ let
}; };
}; };
config = mkIf cfg.enable {
in { systemd.services.pgmanage = {
description = "pgmanage - PostgreSQL Administration for the web";
options.services.pgmanage = pgmanageOptions; wants = [ "postgresql.service" ];
after = [ "postgresql.service" ];
# This is deprecated and should be removed for NixOS-18.03. wantedBy = [ "multi-user.target" ];
options.services.postage = pgmanageOptions; serviceConfig = {
User = pgmanage;
config = mkMerge [ Group = pgmanage;
{ assertions = [ ExecStart = "${pkgs.pgmanage}/sbin/pgmanage -c ${confFile}" +
{ assertion = !config.services.postage.enable; optionalString cfg.localOnly " --local-only=true";
message =
"services.postage is deprecated in favour of pgmanage. " +
"They have the same options so just substitute postage for pgmanage." ;
}
];
}
(mkIf cfg.enable {
systemd.services.pgmanage = {
description = "pgmanage - PostgreSQL Administration for the web";
wants = [ "postgresql.service" ];
after = [ "postgresql.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = pgmanage;
Group = pgmanage;
ExecStart = "${pkgs.pgmanage}/sbin/pgmanage -c ${confFile}" +
optionalString cfg.localOnly " --local-only=true";
};
}; };
users = { };
users."${pgmanage}" = { users = {
name = pgmanage; users."${pgmanage}" = {
group = pgmanage; name = pgmanage;
home = cfg.sqlRoot; group = pgmanage;
createHome = true; home = cfg.sqlRoot;
}; createHome = true;
groups."${pgmanage}" = {
name = pgmanage;
};
}; };
}) groups."${pgmanage}" = {
]; name = pgmanage;
};
};
};
} }

View File

@ -219,7 +219,6 @@ mapAliases ({
pltScheme = racket; # just to be sure pltScheme = racket; # just to be sure
polarssl = mbedtls; # added 2018-04-25 polarssl = mbedtls; # added 2018-04-25
poppler_qt5 = libsForQt5.poppler; # added 2015-12-19 poppler_qt5 = libsForQt5.poppler; # added 2015-12-19
postage = pgmanage; # added 2017-11-03
procps = procps-ng; # added 2018-04-25 procps = procps-ng; # added 2018-04-25
prometheus-statsd-bridge = prometheus-statsd-exporter; # added 2017-08-27 prometheus-statsd-bridge = prometheus-statsd-exporter; # added 2017-08-27
pulseaudioLight = pulseaudio; # added 2018-04-25 pulseaudioLight = pulseaudio; # added 2018-04-25