Files
nix-flake/README.md
T
2026-07-03 15:21:50 +01:00

38 lines
744 B
Markdown

### installation
first, you must edit /etc/nixos/configuration.nix to include the following:
```
{
config,
pkgs,
...
}: {
imports = [
<...>
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
<...>
networking.hostname = "<hostname>";
<...>
environment.systemPackages = with pkgs; [
git
];
}
```
then, run `sudo nixos-rebuild switch` once to apply those changes.
reboot, to make sure that everything applied properly.
finally, run `sudo nixos-rebuild switch --flake /home/grey/nixos#<hostname>` to apply the flake.
reboot again, and you should now land on your desktop/login screen!
now you have access to `nh os switch ~/nixos`, and shouldn't touch the global config ever again.