Skip to content

tangtang95/dotnix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

291 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DotNix

Dotfiles for configuring linux environments through nix tools.

Nix installation

Use determinatate system nix installer since it will also automatically enable flakes experimental feature (https://github.com/DeterminateSystems/nix-installer).

Usage for NixOS configurations

Manage NixOS configurations with the following command:

sudo nixos-rebuild switch --flake ~/dotnix

NOTE: it will select the correct configuration based on the hostname

Usage for home configurations

Manage home with the following command:

nix-shell -p home-manager # required only first time
home-manager switch --flake ~/dotnix

Limitations

Change default shell

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

Other tweaks

Nix store cleanup

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

Both commands are necessary to cleanup completely

About

Dotfiles using nix home manager for Linux

Resources

Stars

Watchers

Forks

Contributors

Languages