aboutsummaryrefslogtreecommitdiff
path: root/home-manager (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-08-30home-manager: support `--option` argumentRobert Helgesson1-0/+5
Fixes #784
2019-08-26home-manager: support a few extra pass-through optionsRobert Helgesson1-1/+13
These options will be passed through to the `nix-build` tool.
2019-08-26home-manager: exit directly after printing helpRobert Helgesson1-0/+1
2019-08-15install: restrict to nix-shellRobert Helgesson1-1/+5
This commit adds a "build" command to the install derivation that tells the user that `nix-shell` should be used. A derivation attribute `shellHookOnly = true` is also added with the intent to indicate that the shell hook is the entire point of the derivation.
2019-06-09home-manager: rewrite argument parsingRobert Helgesson2-43/+70
This rewrite allows "long options" but unfortunately does not allow merged options such as `-vn`. Also improve the home-manager manual page, with this it should include all sub-commands and arguments. Finally, include the home-manager manual page in the generated HTML documentation.
2019-06-09files: backup file collisionsJudson1-1/+5
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
2019-06-01home-manager: add Bash completionSam Boosalis2-0/+346
2019-04-28home-manager: add uninstall commandRobert Helgesson1-11/+75
2019-04-10home-manager: remove unnecessary error messageRobert Helgesson1-1/+0
An error message about the erroneous option is already printed by `getopts` so there is no need to print it again.
2019-04-06home-manager: use `callPackage` where appropriatearcnmx2-10/+10
2019-03-18Remove some use of `mkDerivation`Robert Helgesson1-14/+15
Instead use `runCommand`, which by default uses `stdenvNoCC` resulting in a reduced dependency footprint. Fixes #612
2018-12-04home-manager: add edit commandzimbatm1-0/+16
With this change, running home-manager edit opens `$HOME_MANAGER_CONFIG` in `$EDITOR`. This is mainly for convenience. Users should not have to remember the exact location of the Home Manager configuration.
2018-12-04Change installation instructions to use nix-channelRobert Helgesson1-1/+18
This avoids the uncontrollable nature of fetching the tarball as part of the evaluation. Instead the user can decide when to update and also perform rollbacks, if necessary.
2018-12-04home-manager: import modules using relative pathWael M. Nasreddine1-1/+1
2018-10-18home-manager: add generation expiration commandAlex Brandt2-4/+29
This adds a new command to the home-manager shell script that allows generations to be removed that are older than an given absolute or relative date. This allows users to manage the expiration of their home-manager generations separately from their system or user profiles via nix-collect-garbage. It is most important if the user desires to have a convenient way to have different expiration times for Home Manager generations than other system or user profiles.
2018-08-28home-manager: enable build output during switchRobert Helgesson1-2/+1
Fixes #352
2018-07-31Avoid substitution for some derivationsRobert Helgesson1-0/+2
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
2018-07-31home-manager: fix work directory when building generationRobert Helgesson1-0/+2
2018-07-31home-manager: fix GC issueRobert Helgesson1-26/+32
It was previously possible to create the news information and lose it in a Nix GC before being able to view it. This also causes a switch to error out. This change makes the news information a root in the garbage collector. Note, this change also removes the need for `nix eval` so the `doBuildAttr` function is simplified accordingly. Fixes #327
2018-07-12home-manager: resolve default configuration file pathRobert Helgesson1-1/+1
Home Manager needs an absolute and resolved path to its configuration file. The default configuration path is absolute but not necessarily resolved. For example, some users may have `~/.config` be a symbolic link to somewhere else. We therefore run the default configuration path through the `realpath` tool to resolve it. Fixes #304
2018-07-08home-manager: add support for the nix toolRobert Helgesson1-16/+61
This adds an experimantal, undocumented, and unsupported flag `-2` for the `home-manager` command that enables the use of the new `nix` command instead of `nix-build`.
2018-03-03home-manager: colorize only when connected to terminalRobert Helgesson1-1/+7
Before, the output of `home-manager generations` would be colorized even when used in a pipeline.
2018-01-28home-manager: switch NIX_PATH orderRobert Helgesson1-1/+1
This new order allows overriding the home-manager path from the command line using `home-manager -I home-manager=/a/b/c`.
2018-01-27home-manager: add shellcheck directivesRobert Helgesson1-0/+6
2018-01-27home-manager: improve the generation timestamp formatRobert Helgesson1-2/+2
2018-01-22home-manager: check whether a command is passedMario Rodas1-0/+5
"set -u" treats unset variables as an error, and $1 is unbound when no command is passed.
2017-11-29home-manager: use `shellHook` to installRobert Helgesson1-0/+37
This changes the installation command from nix-shell $HM_PATH -A install --run 'home-manager switch' to nix-shell $HM_PATH -A install The added shell hook will print some useful information and run `home-manager switch`.
2017-11-12home-manager: look for '--help' on command lineRobert Helgesson1-0/+9
This is a special case to work around the lack of long options in `getopts`.
2017-11-12home-manager: add 'remove-generations' commandRobert Helgesson1-1/+48
This command allows the user to immediately remove specific generations from the profiles directory.
2017-11-12home-manager: minor cleanup output from generationsRobert Helgesson1-1/+2
2017-11-06use `buildCommand` for single phase buildsCornelius Mika1-3/+1
2017-11-05home-manager: refuse build if CWD is read-onlyRobert Helgesson1-0/+5
This produces a clearer error message than produced by Nix. Fixes #116.
2017-11-02home-manager: avoid import to improve error messagesRobert Helgesson1-4/+3
When using `import` to inject the configuration into the module system we lose the location in error messages, i.e., it just says ``<unknown-file>'`.
2017-10-29home-manager: use XDG configuration directoryRobert Helgesson1-3/+4
2017-10-24fix typoSilvan Mosberger1-1/+1
2017-10-24home-manager: point <home-manager> to project rootRobert Helgesson3-17/+16
Before this path would point to the modules path. Using the project root instead makes it possible to set `<home-manager>` to point to a downloadable archive of Home Manager. This should make it significantly easier to install and keep Home Manager up to date. To match this change we also deprecate the Home Manager option programs.home-manager.modulesPath and instead ask users to use programs.home-manager.path
2017-10-22home-manager: fix typoRuben Maher1-1/+1
2017-10-18home-manager: change platforms to `unix`Robert Helgesson1-1/+1
2017-10-16home-manager: add license fieldRobert Helgesson1-0/+1
2017-09-09home-manager: present news even if assertion failedRobert Helgesson1-7/+17
2017-09-06home-manager: minor news build cleanupsRobert Helgesson1-4/+11
- Rename the build function. - Specify the built attribute in the build function. - Make the news build silent.
2017-09-05home-manager: add news sub-commandRobert Helgesson3-13/+185
This command allows the user to examine the news items generated by the news module. See #52. Many thanks to @nonsequitur and @uvNikita for suggestions and improvements.
2017-09-04home-manager: make sure switch generation is GC rootRobert Helgesson1-2/+12
Using `--no-out-link` is convenient but it does not set up a GC root, so an unfortunately timed GC could remove the generation before activation completes. Many thanks to @nonsequitur for noting this problem.
2017-09-01home-manager: print errors to stderrRobert Helgesson1-5/+9
2017-08-28home-manager: remove escapingNikita Uvarov1-1/+1
The Nix code that was extracted to its own file erroneously included escaping of "${".
2017-08-28home-manager: move Nix code to own fileRobert Helgesson2-19/+16
2017-08-27home-manager: minor attribute renameRobert Helgesson2-2/+2
The "activation-script" attribute doesn't actually point directly at the activation script. Renamed the attribute to be more descriptive.
2017-08-27home-manager: simplify use of nix-build outputRobert Helgesson1-27/+5
There is no need to specify an out link when switching to a new generation since nix-build prints the store path on standard output. Similarly, when just building a generation we specify no out link since nix-build will use "result" by default.
2017-08-20home-manager: show full script path on activation errorCornelius Mika1-1/+2
Run the activation script in its original nix-store location so that Bash error messages show the real script location instead of 'wrkdir', which gets deleted right after the script exits.
2017-08-20home-manager: exit with an error on build failureCornelius Mika1-3/+5
Because 'set -e' has no effect on commands that run in an if condition, the script was always exiting with no error when 'doBuild' failed. As a bonus, $wrkdir is now always removed after building.