diff options
author | Florian Klink <flokli@flokli.de> | 2022-03-24 18:57:16 +0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2022-03-24 18:57:16 +0100 |
commit | e3083decc4dea10e34ac08b705ea74808cefa524 (patch) | |
tree | 440d143a7acddf82edb1a22ba745d29d6ba8712c /nixos/lib | |
parent | 74bae067487b1292edf5e97962de2bccb014ca15 (diff) |
systemd-initrd, systemd-lib: drop initrdServiceToUnit
We can just use serviceToUnit here.
Diffstat (limited to 'nixos/lib')
-rw-r--r-- | nixos/lib/systemd-lib.nix | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/nixos/lib/systemd-lib.nix b/nixos/lib/systemd-lib.nix index 75f1d83c2cfd8..aba63886e0f58 100644 --- a/nixos/lib/systemd-lib.nix +++ b/nixos/lib/systemd-lib.nix @@ -391,22 +391,6 @@ in rec { ''; }; - initrdServiceToUnit = name: def: - { inherit (def) aliases wantedBy requiredBy enable; - text = commonUnitText def + - '' - [Service] - ${let env = def.environment; - in concatMapStrings (n: - let s = optionalString (env.${n} != null) - "Environment=${builtins.toJSON "${n}=${env.${n}}"}\n"; - # systemd max line length is now 1MiB - # https://github.com/systemd/systemd/commit/e6dde451a51dc5aaa7f4d98d39b8fe735f73d2af - in if stringLength s >= 1048576 then throw "The value of the environment variable ‘${n}’ in systemd service ‘${name}.service’ is too long." else s) (attrNames env)} - ${attrsToSection def.serviceConfig} - ''; - }; - socketToUnit = name: def: { inherit (def) aliases wantedBy requiredBy enable; text = commonUnitText def + |