mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
docs: add example how to use flakes on non-NixOS
This commit is contained in:
parent
39c5c7397e
commit
520adafcb9
1 changed files with 27 additions and 0 deletions
27
README.md
27
README.md
|
@ -356,6 +356,33 @@ as follows:
|
|||
}
|
||||
```
|
||||
|
||||
If you are not using NixOS you can place the following flake in
|
||||
`~/.config/nixpkgs/flake.nix` to load your standard Home Manager
|
||||
configuration:
|
||||
|
||||
```nix
|
||||
{
|
||||
description = "A Home Manager flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs: {
|
||||
homeConfigurations = {
|
||||
jdoe = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
system = "x86_64-linux";
|
||||
homeDirectory = "/home/jdoe";
|
||||
username = "jdoe";
|
||||
configuration.imports = [ ./home.nix ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Note, the Home Manager library is exported by the flake under
|
||||
`lib.hm`.
|
||||
|
||||
|
|
Loading…
Reference in a new issue