systemd service: rename generator-packages

This commit is contained in:
Nikolay Amiantov 2019-07-25 16:26:28 +03:00
parent cc9fb5f015
commit fd405dab3e
3 changed files with 7 additions and 4 deletions

View File

@ -257,6 +257,9 @@ with lib;
(mkRenamedOptionModule [ "networking" "extraResolvconfConf" ] [ "networking" "resolvconf" "extraConfig" ]) (mkRenamedOptionModule [ "networking" "extraResolvconfConf" ] [ "networking" "resolvconf" "extraConfig" ])
(mkRenamedOptionModule [ "networking" "resolvconfOptions" ] [ "networking" "resolvconf" "extraOptions" ]) (mkRenamedOptionModule [ "networking" "resolvconfOptions" ] [ "networking" "resolvconf" "extraOptions" ])
# systemd
(mkRenamedOptionModule [ "systemd" "generator-packages" ] [ "systemd" "generatorPackages" ])
] ++ (flip map [ "blackboxExporter" "collectdExporter" "fritzboxExporter" ] ++ (flip map [ "blackboxExporter" "collectdExporter" "fritzboxExporter"
"jsonExporter" "minioExporter" "nginxExporter" "nodeExporter" "jsonExporter" "minioExporter" "nginxExporter" "nodeExporter"
"snmpExporter" "unifiExporter" "varnishExporter" ] "snmpExporter" "unifiExporter" "varnishExporter" ]

View File

@ -497,7 +497,7 @@ in
''; '';
}; };
systemd.generator-packages = mkOption { systemd.generatorPackages = mkOption {
default = []; default = [];
type = types.listOf types.package; type = types.listOf types.package;
example = literalExample "[ pkgs.systemd-cryptsetup-generator ]"; example = literalExample "[ pkgs.systemd-cryptsetup-generator ]";
@ -762,10 +762,10 @@ in
environment.etc = let environment.etc = let
# generate contents for /etc/systemd/system-generators from # generate contents for /etc/systemd/system-generators from
# systemd.generators and systemd.generator-packages # systemd.generators and systemd.generatorPackages
generators = pkgs.runCommand "system-generators" { generators = pkgs.runCommand "system-generators" {
preferLocalBuild = true; preferLocalBuild = true;
packages = cfg.generator-packages; packages = cfg.generatorPackages;
} '' } ''
mkdir -p $out mkdir -p $out
for package in $packages for package in $packages

View File

@ -56,7 +56,7 @@ in
boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ]; boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ];
systemd.packages = [ pkgs.nfs-utils ]; systemd.packages = [ pkgs.nfs-utils ];
systemd.generator-packages = [ pkgs.nfs-utils ]; systemd.generatorPackages = [ pkgs.nfs-utils ];
environment.etc = { environment.etc = {
"idmapd.conf".source = idmapdConfFile; "idmapd.conf".source = idmapdConfFile;