Return a derivation fn in main nix expression
This simplifies installing by (re-)enabling the standard practice of using the main expression as a function returning the package derivation. Convert the src dir path to a string to avoid needlessly copying the whole dir to the nix store.
This commit is contained in:
parent
4fce730326
commit
85b4c430eb
|
@ -83,7 +83,7 @@ Currently the easiest way to install Home Manager is as follows:
|
||||||
4. Create the first Home Manager generation:
|
4. Create the first Home Manager generation:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ nix-shell $HM_PATH -A install --run 'home-manager switch'
|
$ $(nix-build $HM_PATH --no-out-link)/bin/home-manager switch
|
||||||
```
|
```
|
||||||
|
|
||||||
Home Manager should now be active and available in your user
|
Home Manager should now be active and available in your user
|
||||||
|
|
14
default.nix
14
default.nix
|
@ -1,14 +1,6 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
|
|
||||||
rec {
|
import ./home-manager {
|
||||||
home-manager = import ./home-manager {
|
inherit pkgs;
|
||||||
inherit pkgs;
|
path = toString ./.;
|
||||||
path = ./.;
|
|
||||||
};
|
|
||||||
|
|
||||||
install =
|
|
||||||
pkgs.runCommand
|
|
||||||
"home-manager-install"
|
|
||||||
{ propagatedBuildInputs = [ home-manager ]; }
|
|
||||||
"";
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue