modules/fs: remove unused symlink.targetName
option
This commit is contained in:
@@ -103,19 +103,16 @@ let
|
|||||||
default = null;
|
default = null;
|
||||||
description = "create a file in the /nix/store with the provided text and use that as the target";
|
description = "create a file in the /nix/store with the provided text and use that as the target";
|
||||||
};
|
};
|
||||||
targetName = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = path-lib.leaf path;
|
|
||||||
description = "name of file to create if generated from text";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
config = {
|
config = let
|
||||||
|
name = path-lib.leaf path;
|
||||||
|
in {
|
||||||
target = lib.mkIf (config.text != null) (
|
target = lib.mkIf (config.text != null) (
|
||||||
(pkgs.writeTextFile {
|
(pkgs.writeTextFile {
|
||||||
name = path-lib.leaf path;
|
inherit name;
|
||||||
text = config.text;
|
text = config.text;
|
||||||
destination = "/${config.targetName}";
|
destination = "/${name}";
|
||||||
}) + "/${config.targetName}"
|
}) + "/${name}"
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user