-
Clone this repo
config_path=~/.config/nixos nix run nixpkgs#git clone https://github.com/mawkler/nixos.git $config_path
-
Add an entry for your machine's hostname to this repo's
flake.nix(both to the NixOS and Home Manager section) -
Temporarily uncomment
boot.kernelPackages = "..."infeatures/cachyos.nix(because itsnix.settings.substitutershasn't been built yet, it will try to build the CachyOS kernel from source, which takes hours) -
Install the NixOS and Home-Manager config:
nix-shell --packages git home-manager --run '
hostname=beauty # Set your hostname here (make sure that it matches the name used in step 2)
config_path=~/.config/nixos
# Clone NixOS config
sudo true
sudo mv /etc/nixos/ /etc/nixos-old/
sudo ln -s $config_path /etc/
mkdir -p $config_path/hosts/$hostname
cp /etc/nixos-old/hardware-configuration.nix $config_path/hosts/$hostname
git add $config_path/hosts/$hostname
# Install NixOS config
sudo hostname $hostname
sudo true && nh os switch ~/.config/nixos -- --extra-experimental-features "nix-command flakes" && nh home switch ~/.config/nixos
# Install Neovim configuration
git clone https://github.com/mawkler/nvim.git ~/.config/nvim
'- Re-add the line with
boot.kernelPackages = "..."infeatures/cachyos.nix, and runnh os switch ~/.config/nixos -- --extra-experimental-features "nix-command flakes"(now it should use the cached binary)