Skip to content

lokeshmohanty/nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

241 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Dotfiles in Nix

NixOS

  • 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
  • Apply home configuration
nix shell nixpkgs#home-manager
home-manager switch --flake .#lokesh@sudarshan
  • Update flake
nix flake update

Nix

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>)

Neovim

  • To run my configuration of neovim
nix run github:lokeshmohanty/nix#nvim

Dotfiles Setup

  • 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

Tips

  • Use nix-prefetch-github to get the rev and hash information required for fetchFromGithub

References

TODO