nixos/etc: keep directories in derivation name

This changes eg. etc-timesyncd.conf to etc-systemd-timesyncd.conf which
better reflects the actual location of the config file.
This commit is contained in:
Sandro Jäckel 2023-06-07 00:06:15 +02:00
parent e2c555799c
commit fadc824f20
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -173,7 +173,7 @@ in
config = {
target = mkDefault name;
source = mkIf (config.text != null) (
let name' = "etc-" + baseNameOf name;
let name' = "etc-" + lib.replaceStrings ["/"] ["-"] name;
in mkDerivedConfig options.text (pkgs.writeText name')
);
};