- Apply system configuration (
nixos-install --flake .#hostname on live installation media)
sudo nixos-rebuild switch --flake .#sudarshan
# nh variant (path isn't required if programs.nh.flake is defined)
nh os switch . -c sudarshan
nix shell nixpkgs#home-manager
home-manager switch --flake .#lokesh@sudarshan
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
nix-copy-closure --to <username>@<ip> $(type -p <package-name>)
- To run my configuration of neovim
nix run github:lokeshmohanty/nix#nvim
- Make git ignore machine specific configuration while keeping the default config in repository
git update-index --skip-worktree ./config/hypr/monitors.conf
git update-index --skip-worktree ./config/hypr/workspaces.conf
- You can get list of files that are marked to be skipped with
git ls-files -v . | grep ^S
- Use
nix-prefetch-github to get the rev and hash information required for fetchFromGithub