| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
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>'`.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- Rename the build function.
- Specify the built attribute in the build function.
- Make the news build silent.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
The Nix code that was extracted to its own file erroneously included
escaping of "${".
|
| |
|
|
|
|
|
| |
The "activation-script" attribute doesn't actually point directly at
the activation script. Renamed the attribute to be more descriptive.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
The user-defined path will be used if present, otherwise the two
"fallback" defaults (in `.nixpkgs` and `.config/nixpkgs`) will be
used.
|
|
|
|
|
| |
The `NIX_PATH` variable is set by the `setHomeManagerModulesPath`
function so it is unnecessary to set it again.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes the default path of the Home Manager configuration
file from `~/.nixpkgs/home.nix` to `~/.config/nixpkgs/home.nix`. The
old path is still supported and will be used if the `.config` path
does not exist.
This aligns Home Manager with the preferred configuration directory in
NixOS 17.03.
Fixes #13.
|
|
|
|
|
|
|
| |
This removes the old argument based method that Home Manager used to
find its modules by a `NIX_PATH` based method. Specifically, this adds
a `home-manager` Nix path prefix that can be overridden much like with
the `nixpkgs` path prefix.
|
|
|
|
|
| |
This ensures that we use the expected version of some useful tools,
such as readlink.
|
|
|
|
|
| |
In particular, this will ensure that the whole script fails with an
error code if the activation script fails during a switch. Fixes #10.
|
|
|
|
|
|
| |
For example, with these settings Bash will complain if uninitialized
variables are used. Some code has been improved to run cleanly with
these settings.
|
| |
|
|
|
|
|
| |
This options is passed on to nix-build and allows, for example, building
a user environment using a custom Nixpkgs.
|
| |
|
|
|
|
| |
Make it look a little nicer than having nix-build emit the error.
|
| |
|
| |
|
|
|
|
| |
In particular, error out if the output path already exists.
|
| |
|
| |
|
|
|
|
|
| |
This will build a configuration into an `result` output directory. Does
not create a new generation.
|
|
|
|
|
| |
With this commit the activation script is run only if nix-build
succeeded.
|
| |
|
| |
|
|
|
|
|
| |
Before we put only user files in the generation directory but that was
quite limiting. In particular, we lost track of the activation script.
|
|
|
|
|
|
| |
Nix needs an absolute path and the user may have given a relative path
for the configuration file. We therefore need to expand it using the
`realpath` tool.
|
|
|
|
|
| |
When listing packages we have to handle the case where the rebuild
command has not yet been run.
|
|
|