aboutsummaryrefslogtreecommitdiff
path: root/modules/files.nix (follow)
Commit message (Collapse)AuthorAgeFilesLines
* files: reference lndir through xorgzowoq2020-06-061-1/+1
| | | | | | The xlibs attribute set is deprecated and is an alias for xorg. PR #1304
* files: print source path for detected collisionpiegames2020-05-171-2/+2
| | | | PR #1236
* files: fix warning messageCole Helbling2020-05-171-1/+1
| | | | PR #1241
* files: add helper function `mkOutOfStoreSymlink`Robert Helgesson2020-05-021-0/+7
| | | | | | | | | | | | | Using this function it is possible to make `home.file` create a symlink to a path outside the Nix store. For example, a Home Manager configuration containing home.file."foo".source = config.lib.file.mkOutOfStoreSymlink ./bar; would upon activation create a symlink `~/foo` that points to the absolute path of the `bar` file relative the configuration file. PR #1211
* files: add `force` flagRobert Helgesson2020-03-171-1/+21
| | | | | | Enabling this flag for a `home.file` entry causes the target to be unconditionally overwritten. The option is not visible in documentation for now and shouldn't be relied on for general use.
* files: use `nix-env` to create profile linksRobert Helgesson2020-02-151-2/+1
|
* Switch to extended Nixpkg's `lib`Robert Helgesson2020-01-211-6/+4
| | | | | | | | | This change makes use of the `extend` function inside `lib` to inject a new `hm` field containing the Home Manager library functions. This simplifies use of the Home Manager library in the modules and reduces the risk of accidental infinite recursion. PR #994
* files: additional support for symlinked `/nix`Philip Stears2019-11-261-6/+10
| | | | | | | | | | | In the case where `/nix` is a link, for example, on macOS Catalina, `builtins.storeDir` returns `/nix`, not the canonical location. This causes tests on existing files to result in Home Manager thinking those files are outside of the store. This change uses `readlink` on the store path so that the tests work as intended.
* files: update script to support linked Nix storeAnton Plotnikov2019-11-221-2/+5
|
* files: backup file collisionsJudson2019-06-091-3/+17
| | | | | | | | When a configuration file would be written to an existing file, rather than failing switch (and having the user have to move or delete those files), move the files automatically to a new path. Closes #585
* files: fix `find` invocation broken in c94eaa0eWill Dietz2019-04-301-2/+2
| | | | | | | | | | | Add parens to expression so the `-exec` includes files matching both. Otherwise (before this change) the `-exec` is only invoked for links (`-type l`): file or (link -> doexec) => (file or link) -> doexec
* files: replace unnecessary use of xargsRobert Helgesson2019-04-271-4/+4
|
* Remove some use of `mkDerivation`Robert Helgesson2019-03-181-13/+11
| | | | | | | Instead use `runCommand`, which by default uses `stdenvNoCC` resulting in a reduced dependency footprint. Fixes #612
* files: allow a wider range of source file namesRobert Helgesson2019-01-191-16/+11
| | | | | | | In particular support source files whose name start with `.` or contain characters not allowed in the nix store, such as spaces. Also add some test cases for `home.file`.
* Avoid substitution for some derivationsRobert Helgesson2018-07-311-0/+3
| | | | | | | | In particular, don't bother attempting to do substitution of the home files and home generation derivations since these rarely, if ever, could be substituted. Fixes #330
* files: add `onChange` optionAndrew Scott2018-07-271-0/+18
| | | | | | This option allows execution of arbitrary shell code when a file that is linked into the home directory has been changed between generations.
* Add dag library to `config.lib`Robert Helgesson2017-12-261-3/+4
| | | | Also replace all imports of `dag.nix` by the entry in `config.lib`.
* systemd: remove filename hackSilvan Mosberger2017-12-121-7/+1
|
* files: improve 'target not in $HOME' checkCornelius Mika2017-12-121-1/+1
| | | | Check for prefix instead of inclusion.
* files: remove `mode` optionRobert Helgesson2017-12-111-20/+2
| | | | | This option was deprecated >1 month ago and is therefore removed as per the corresponding news entry.
* files: log when creating home file linksRobert Helgesson2017-11-151-0/+2
|
* files: fix order of activation actionsRobert Helgesson2017-11-151-1/+23
| | | | | | | Specifically, move the cleanup phase to before we switch over the generation links in `gcroots` and `profiles`. Fixes https://github.com/rycee/home-manager/issues/134
* files: add special handling of systemd filesRobert Helgesson2017-11-121-2/+17
| | | | | | | | | | | | Unfortunately systemd derives nonsensical unit names when the unit file is a link to a link to a file. This commit ensures that any file whose target path matches the pattern `*/systemd/user/*` will be reachable with only one link hop. This also reverts f52ec0df7c00a2d3938091f3d72641d023385878, which contained a temporary fix. This commit is an improvements in that it is more explicit and also handles unit files given directly as a home file source.
* files: improve keyword for inheriting executable bitRobert Helgesson2017-11-121-2/+2
|
* files: simplify cleanup script slightlyRobert Helgesson2017-11-111-6/+8
| | | | | | The cleanup script now takes relative paths as arguments, not absolute paths into the old generation. This uses a GNU specific feature of find.
* files: support recursive linking of directoryRobert Helgesson2017-11-071-2/+11
|
* files: extract type of `home.file` into own fileRobert Helgesson2017-11-061-82/+4
|
* files: link home files instead of copyingCornelius Mika2017-11-061-27/+48
| | | | | Only copy files that need their execute bit changed or use the deprecated `mode` option.
* use `buildCommand` for single phase buildsCornelius Mika2017-11-061-3/+1
|
* files: extract common variableCornelius Mika2017-11-061-5/+6
| | | | | Also improve the pattern used to determine whether a symlink target points to a Home Manager file path.
* files: add option 'executable'Cornelius Mika2017-11-061-6/+45
| | | | | This also deprecates the `home.file.<name?>.mode` option, which is misleading because the Nix store only allows modes 'r--' and 'r-x'.
* files: allow arbitrary paths as home file namesCornelius Mika2017-11-061-2/+24
| | | | | | | | | By sanitizing the home file name in the derivation name, the home file name is no longer exposed to the naming restrictions for nix store paths. For example, it is now possible to define home files with spaces in their names without providing a target or source attribute.
* files: be less verbose when linking a directoryRobert Helgesson2017-10-291-2/+2
|
* files: support absolute home directory pathSilvan Mosberger2017-10-151-0/+2
|
* Separate home files module from home-environment.nixSilvan Mosberger2017-10-151-0/+237