diff options
author | Nikolay Amiantov <ab@fmap.me> | 2019-07-26 12:11:44 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2019-08-01 00:55:35 +0300 |
commit | 717b8b3219e0a207e16e28f828f88060b0477d0b (patch) | |
tree | fec4aa8017fb64d2c73739be731ddfaa0ec35a4b /nixos/modules/system/boot/systemd.nix | |
parent | ca780f4a186ab27425bd57737fe7b9638c2b27a8 (diff) | |
download | nixpkgs-717b8b3219e0a207e16e28f828f88060b0477d0b.tar nixpkgs-717b8b3219e0a207e16e28f828f88060b0477d0b.tar.gz nixpkgs-717b8b3219e0a207e16e28f828f88060b0477d0b.tar.bz2 nixpkgs-717b8b3219e0a207e16e28f828f88060b0477d0b.tar.lz nixpkgs-717b8b3219e0a207e16e28f828f88060b0477d0b.tar.xz nixpkgs-717b8b3219e0a207e16e28f828f88060b0477d0b.tar.zst nixpkgs-717b8b3219e0a207e16e28f828f88060b0477d0b.zip |
systemd service: remove generator-packages option
Use systemd.packages instead, it's less error prone and more in line with what's expected.
Diffstat (limited to 'nixos/modules/system/boot/systemd.nix')
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 96c4ee30584..1025a038c4b 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -427,7 +427,8 @@ in systemd.packages = mkOption { default = []; 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 { @@ -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 { type = types.attrsOf types.path; 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 { default = "multi-user.target"; type = types.str; @@ -779,9 +766,9 @@ in environment.etc = let # 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; - packages = packages; + packages = cfg.packages; } '' set -e mkdir -p $out @@ -854,8 +841,8 @@ in ${concatStringsSep "\n" cfg.tmpfiles.rules} ''; - "systemd/system-generators" = { source = hooks "generators" cfg.generators cfg.generatorPackages; }; - "systemd/system-shutdown" = { source = hooks "shutdown" cfg.shutdown cfg.shutdownPackages; }; + "systemd/system-generators" = { source = hooks "generators" cfg.generators; }; + "systemd/system-shutdown" = { source = hooks "shutdown" cfg.shutdown; }; }); services.dbus.enable = true; |