Dotfiles for configuring linux environments through nix tools.
Use determinatate system nix installer since it will also automatically enable flakes experimental feature (https://github.com/DeterminateSystems/nix-installer).
Manage NixOS configurations with the following command:
sudo nixos-rebuild switch --flake ~/dotnixNOTE: it will select the correct configuration based on the hostname
Manage home with the following command:
nix-shell -p home-manager # required only first time
home-manager switch --flake ~/dotnixAdd shell program to /etc/shells and then change shell. Example with fish:
command -v fish | sudo tee -a /etc/shells
sudo chsh -s "$(command -v fish)" "${USER}"NOTE: For WSL, you need to install and use fish on FHS env (e.g. /usr/bin/fish)
- If there is screen tearing with NVIDIA gpu, enable force composition pipeline
- In order to use VIA keyboard tool, you need to add udev rule for the USB driver keyboard (https://get.vial.today/manual/linux-udev.html)
I prefer doing the cleanup of nix store manually as when it is done as a job, it blocks disk io when running hinders me. So to cleanup the nix store, run these two commands whenever I need to restore some disk space:
sudo nix-collect-garbage --delete-older-than 7d # for nixos
nix-collect-garbage --delete-older-than 7d # for home-managerBoth commands are necessary to cleanup completely