home-environment: allow arbitrary paths as home file names
By not using the home file name in a derivation name, the home file name is no longer exposed to the naming restrictions for nix store paths. For example, it's now possible to define home files with spaces in their names without providing a target or source attribute.
This commit is contained in:
parent
9c1b3735b4
commit
2524d92e2b
|
@ -134,8 +134,7 @@ in
|
|||
config = {
|
||||
target = mkDefault name;
|
||||
source = mkIf (config.text != null) (
|
||||
let name' = "user-etc-" + baseNameOf name;
|
||||
in mkDefault (pkgs.writeText name' config.text)
|
||||
mkDefault (pkgs.writeText "home-file" config.text)
|
||||
);
|
||||
};
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue