A (WIP) NixOS Configuration repo for all my systems.
Install the nixos system. Note this command is hardware dependent. We use the hostname to associate hardware.
sudo nixos-rebuild switch --flake .#${hostname}
If nh
is availabe on the system, you can simply do
nh os switch .
First, install a minimal installation of NixOS.
Next, once you get into the system. Create a new entry for the system in the
nixosConfigurations
. This will require copying the
hardware-configuration.nix
file into the config as well.
Be sure to also go through the configuration.nix
and set the relevent parameters
to build the same system.
Enable flakes on the original system. Add the following to the
/etc/nixos/configuration.nix
file.
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [ git ];
Make sure to update the channels to unstable as well.
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
nixos-rebuild switch --upgrade
Refer to this for neovim
https://github.com/zamlz/nix/blob/007d7ffa9c244af4d539fa7b32e8cb2a76ae4d91/shell/neovim.nix
`