Hi! 👋 Welcome to my repository containing my Nix configurations to manage my machines. A declarative and more reproducible way to set working environments.
Important
Disclaimer: This is a personal configuration. I am no expert, however I hope that this helps you! For more help on Nix(OS) seek out the NixOS discourse. If you are new to dotfiles in general, use a bare git solution to start with and built it from there. Make the tools work for you rather than the other way around.
-
Ensure
nix
is installed. -
Bootstrap:
$ nix-shell --packages git --command "$(curl -fsSL https://raw.githubusercontent.com/bphenriques/dotfiles/master/bin/bootstrap.sh)"
-
Apply:
$ "$HOME"/.dotfiles/bin/sync.sh
-
Import the GPG Key using
gpg --import
. You may need to restart. -
Reboot!
In addition to sops-nix for critical secrets and combination of age
and git-filter
(smudge
clean
) to hide sensitive information required in Nix evaluation time.
To setup git-filter
(smudge
clean
) initialize it:
$ ./bin/git-secret-filter.sh init
And, as detailed in .gitattributes
, only *.age.nix
are affected. My public keys under .sops.yaml
and the corresponding private keys under "$XDG_CONFIG_HOME/sops/age/keys.txt"
.
Nix can be overwhelming with its steep learning curve. I found it easier reading documentation and some several dotfiles:
- Nix Docs
- Home Manager Docs
- Nix Darwin Docs
- Flakes Docs
- Flakes Introduction.
- Several dotfiles (thank you!):
- Ad-hoc documentation for reference that I find useful:
- https://nixpkgs-manual-sphinx-markedown-example.netlify.app/development/option-types.xml.html
- https://teu5us.github.io/nix-lib.html#builtins.replacestrings
- https://nixos.org/manual/nix/stable/language/operators.html
- https://nixos.org/manual/nix/stable/language/builtins.html
- https://github.com/NixOS/nixpkgs/blob/master/lib/strings.nix
- https://github.com/NixOS/nixpkgs/blob/master/lib/types.nix