Skip to content

brongulus/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flake it till you make it!

The dots used to be managed by a custom script that I wrote, which was very much prone to breakages, so I took a flaky approach.

This is an experimental branch where I’m testing nix.

I wish to work with a single file mindset and see how far I can take it, that’s why I opted to not use home-manager and use GNU Stow instead for dotfiles symlink.

References

Installation

  • Get the list of packages to replace using brew leaves.
  • Install nix: curl -L https://nixos.org/nix/install | sh.

Set-up the packages

  • Create ./flake.nix
  • (Check *Macos exclusive stuff if you’re running darwin)

    Run nix --extra-experimental-features "nix-command flakes" profile install . --impure in the dotfiles directory.

  • Run stow <dir> to symlink the dotfiles. e.g.: stow nix (To not link and see what the stow command will do, run stow -nv linux)
  • To upgrade the packages, run nix flake update and then nix profile upgrade dotfiles --impure
  • To upgrade specific flake inputs nix flake update emacs-overlay
  • Remember to run nix-collect-garbage -d to clean up old generations and to save space.

Macos exclusive stuff

  • Most of the apps are installed using nix-homebrew and system configuration happens via nix-darwin
  • I have created two aliases for working with darwin, they are nix-update-mac and darwin-rebuild-mac respectively. These have to set the HOSTNAME envVar which is used in the flake file for darwinConfigurations.
alias nix-update-mac='HOSTNAME=$(hostname -s) nix build .#darwinConfigurations.$(hostname -s).system --impure'
alias darwin-rebuild-mac='HOSTNAME=$(hostname -s) ./result/sw/bin/darwin-rebuild switch --flake . --impure'

About

Not a hot mess.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published