1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-23 10:19:48 +01:00

docs: add example how to use flakes on non-NixOS

This commit is contained in:
Sandro 2021-11-11 22:46:52 +01:00 committed by Robert Helgesson
parent 39c5c7397e
commit 520adafcb9
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -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`.