systemd service: remove generator-packages option
Use systemd.packages instead, it's less error prone and more in line with what's expected.
This commit is contained in:
parent
ca780f4a18
commit
717b8b3219
|
@ -221,6 +221,7 @@ with lib;
|
||||||
(mkRemovedOptionModule [ "services" "mysql" "pidDir" ] "Don't wait for pidfiles, describe dependencies through systemd")
|
(mkRemovedOptionModule [ "services" "mysql" "pidDir" ] "Don't wait for pidfiles, describe dependencies through systemd")
|
||||||
(mkRemovedOptionModule [ "services" "mysql" "rootPassword" ] "Use socket authentication or set the password outside of the nix store.")
|
(mkRemovedOptionModule [ "services" "mysql" "rootPassword" ] "Use socket authentication or set the password outside of the nix store.")
|
||||||
(mkRemovedOptionModule [ "services" "zabbixServer" "dbPassword" ] "Use services.zabbixServer.database.passwordFile instead.")
|
(mkRemovedOptionModule [ "services" "zabbixServer" "dbPassword" ] "Use services.zabbixServer.database.passwordFile instead.")
|
||||||
|
(mkRemovedOptionModule [ "systemd" "generator-packages" ] "Use systemd.packages instead.")
|
||||||
|
|
||||||
# ZSH
|
# ZSH
|
||||||
(mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ])
|
(mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ])
|
||||||
|
@ -257,9 +258,6 @@ 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" ]
|
||||||
|
|
|
@ -427,7 +427,8 @@ in
|
||||||
systemd.packages = mkOption {
|
systemd.packages = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
type = types.listOf types.package;
|
type = types.listOf types.package;
|
||||||
description = "Packages providing systemd units.";
|
example = literalExample "[ pkgs.systemd-cryptsetup-generator ]";
|
||||||
|
description = "Packages providing systemd units and hooks.";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.targets = mkOption {
|
systemd.targets = mkOption {
|
||||||
|
@ -497,13 +498,6 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.generatorPackages = mkOption {
|
|
||||||
default = [];
|
|
||||||
type = types.listOf types.package;
|
|
||||||
example = literalExample "[ pkgs.systemd-cryptsetup-generator ]";
|
|
||||||
description = "Packages providing systemd generators.";
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.shutdown = mkOption {
|
systemd.shutdown = mkOption {
|
||||||
type = types.attrsOf types.path;
|
type = types.attrsOf types.path;
|
||||||
default = {};
|
default = {};
|
||||||
|
@ -514,13 +508,6 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.shutdownPackages = mkOption {
|
|
||||||
default = [];
|
|
||||||
type = types.listOf types.package;
|
|
||||||
example = literalExample "[ pkgs.mdadm ]";
|
|
||||||
description = "Packages providing systemd shutdown executables.";
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.defaultUnit = mkOption {
|
systemd.defaultUnit = mkOption {
|
||||||
default = "multi-user.target";
|
default = "multi-user.target";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
@ -779,9 +766,9 @@ in
|
||||||
|
|
||||||
environment.etc = let
|
environment.etc = let
|
||||||
# generate contents for /etc/systemd/system-${type} from attrset of links and packages
|
# generate contents for /etc/systemd/system-${type} from attrset of links and packages
|
||||||
hooks = type: links: packages: pkgs.runCommand "system-${type}" {
|
hooks = type: links: pkgs.runCommand "system-${type}" {
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
packages = packages;
|
packages = cfg.packages;
|
||||||
} ''
|
} ''
|
||||||
set -e
|
set -e
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
|
@ -854,8 +841,8 @@ in
|
||||||
${concatStringsSep "\n" cfg.tmpfiles.rules}
|
${concatStringsSep "\n" cfg.tmpfiles.rules}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
"systemd/system-generators" = { source = hooks "generators" cfg.generators cfg.generatorPackages; };
|
"systemd/system-generators" = { source = hooks "generators" cfg.generators; };
|
||||||
"systemd/system-shutdown" = { source = hooks "shutdown" cfg.shutdown cfg.shutdownPackages; };
|
"systemd/system-shutdown" = { source = hooks "shutdown" cfg.shutdown; };
|
||||||
});
|
});
|
||||||
|
|
||||||
services.dbus.enable = true;
|
services.dbus.enable = true;
|
||||||
|
|
|
@ -56,7 +56,6 @@ in
|
||||||
boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ];
|
boot.initrd.kernelModules = mkIf inInitrd [ "nfs" ];
|
||||||
|
|
||||||
systemd.packages = [ pkgs.nfs-utils ];
|
systemd.packages = [ pkgs.nfs-utils ];
|
||||||
systemd.generatorPackages = [ pkgs.nfs-utils ];
|
|
||||||
|
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
"idmapd.conf".source = idmapdConfFile;
|
"idmapd.conf".source = idmapdConfFile;
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
services.udev.packages = [ pkgs.mdadm ];
|
services.udev.packages = [ pkgs.mdadm ];
|
||||||
|
|
||||||
systemd.packages = [ pkgs.mdadm ];
|
systemd.packages = [ pkgs.mdadm ];
|
||||||
systemd.shutdownPackages = [ pkgs.mdadm ];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "md_mod" "raid0" "raid1" "raid10" "raid456" ];
|
boot.initrd.availableKernelModules = [ "md_mod" "raid0" "raid1" "raid10" "raid456" ];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue