Getting Started
Enable flakes
Flakes as a experimental feature needs to be enabled by adding following config:
bash
echo 'experimental-features = nix-command flakes' >> /etc/nix/nix.conf
1
Then optionally restart nix to make sure it works
bash
sudo systemctl restart nix-daemon.service
1
Initialize configuration
To use unstable version of NixPkgs, use:
bash
nix run home-manager/master -- init --switch
1
To use specific version of NixPkgs, use:
bash
nix run home-manager/release-24.05 -- init --switch
1
This step generates flake.nix
, flake.lock
and home.nix
under ~/.config/home-manager/
console
$ ls ~/.config/home-manager/
flake.lock flake.nix home.nix
1
2
2