aboutsummaryrefslogtreecommitdiff
path: root/home-manager (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-08-14home-manager: remove home-manager-path on uninstallRobert Helgesson1-0/+1
Fixes #1443
2020-06-14home-manager: respect NIX_STATE_DIRDmitry Kalinkin1-5/+7
This allows to install home-manager on a system without root access. PR #1196
2020-05-26Deprecate use of `builtins.getEnv`Robert Helgesson1-1/+18
This removes the use of the non-deterministic function `builtins.getEnv` for state version ≥ 20.09. PR #1269
2020-05-21home-manager: allow unspecified `confAttr`Matthew Bauer1-2/+2
PR #1255
2020-04-23Update documentation for release 20.03Robert Helgesson1-1/+1
2020-04-18home-manager: remove unsupported `-2` optionRobert Helgesson1-54/+20
This option used to make the `home-manager` command use the `nix` tool from Nix 2. Unfortunately the `nix` tool is a bit experimental and it is best to await its stabilization before supporting it in Home Manager.
2020-04-18home-manager: fix shellcheck warningRobert Helgesson1-1/+1
2020-03-25home-manager: add instantiate subcommandTimo Kaufmann2-2/+29
It can be useful to simply instantiate a Home Manager configuration without actually building it, for example for the purpose of pre-building it with some custom command. PR #1099
2020-02-24home-manager: handle args with spaces to doBuildAttrChris Hodapp1-5/+5
Presently, if you pass an argument with spaces in it to `doBuildAttr`, it will be split it into multiple arguments to `nix build` or `nix-build`. This situation arises, for example, on systems with spaces in `XDG_DATA_HOME`. Specifically, the `home-manager` script errors out in trying to address the `read-news` state file. With this change, argument separation should be preserved properly in `doBuildAttr`. PR #1044
2020-02-15home-manager: make sure all files are uninstalledRobert Helgesson1-1/+1
This forces the `home.file` option to be completely empty when switching to the uninstall configuration. This is necessary to guard against files are added by default in Home Manager, such as `$XDG_CACHE_HOME/.keep`.
2020-02-02Apply `nixfmt` on many filesRobert Helgesson1-56/+53
2020-01-01home-manager: fix pass-through option passingoxalica1-2/+2
This resolves, e.g., the errors occurring when passing empty arguments like `--option builders ''`. Closes #967
2019-12-31install: add state version to initial configurationRobert Helgesson1-0/+10
This sets the state version in recent installs to the latest released version. It is beneficial for people to be aware of this option and it is also good to help new users get a more recent setup.
2019-12-01home-manager: add --(no-)substitute optionsRobert Helgesson1-1/+3
Fixes #312
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