Merge pull request #139431 from erikarvstedt/etc-simplify-source

nixos/etc: simplify source path handling

authored by

Robert Hensing and committed by
GitHub
c3bf08d1 09b09bc6

+3 -4
+3 -4
nixos/modules/system/etc/etc.nix
··· 6 6 7 7 let 8 8 9 - # if the source is a local file, it should be imported to the store 10 - localToStore = mapAttrs (name: value: if name == "source" then "${value}" else value); 11 - etc' = map localToStore (filter (f: f.enable) (attrValues config.environment.etc)); 9 + etc' = filter (f: f.enable) (attrValues config.environment.etc); 12 10 13 11 etc = pkgs.runCommandLocal "etc" { 14 12 # This is needed for the systemd module ··· 55 53 mkdir -p "$out/etc" 56 54 ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [ 57 55 "makeEtcEntry" 58 - etcEntry.source 56 + # Force local source paths to be added to the store 57 + "${etcEntry.source}" 59 58 etcEntry.target 60 59 etcEntry.mode 61 60 etcEntry.user