Home Manager: Difference between revisions
imported>Bsima |
imported>Luis-Hebendanz mNo edit summary |
||
| Line 5: | Line 5: | ||
Home Manager can be configured in <code>~/.config/nixpkgs/home.nix</code> or inside configuration.nix. | Home Manager can be configured in <code>~/.config/nixpkgs/home.nix</code> or inside configuration.nix. | ||
For the latter, add the following to your config | For the latter, add the following to your config. Note: fetchTarball does not check the integrity of the downloaded Package. | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
imports = [ | |||
... | |||
"${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos" | |||
]; | |||
home-manager.users.my_username = { ... } | |||
</syntaxhighlight> | |||
For a more secure version: | |||
<syntaxhighlight lang="nix"> | |||
let | |||
home-manager = builtins.fetchGit { | |||
url = "https://github.com/rycee/home-manager.git"; | |||
rev = "dd94a849df69fe62fe2cb23a74c2b9330f1189ed"; # CHANGEME | |||
ref = "release-18.09"; | |||
}; | |||
in | |||
{ | |||
imports = | |||
[ | |||
"${home-manager}/nixos" | |||
]; | |||
} | |||
imports = [ | imports = [ | ||
... | ... | ||