the official feltnerm nix config
nix develop
nix flake update --commit-lock-file
nix flake check
nix fmt
(may not work on macOS)
nix build .#documentation
or
nix build .#watch-documentation
nixos-rebuild --flake '.#<hostname> <check|build|switch>'
darwin-rebuild --flake '.#<hostname> <check|build|switch>'
Uses nixos-generators.
nix build .#nixosConfigurations.<hostName>.config.formats.<format>
Uses nix-topology.
nix build .#topology.x86_64-linux.config.output
nix build .#topology.x86_64-darwin.config.output
home-manager --flake '.#<username> <build|switch>'
nix run .# -- <file>
nix run .#<name>-nvim -- <file>
My (somewhat) useful custom nix packages are defined in ./pkgs
.
Locally, build them with:
nix build .#<pkg>
Subsequently, run them with:
./result/bin/<pkg>
Inspired by the following (and many others!):
- https://github.com/Xe/nixos-configs
- https://github.com/notusknot/dotfiles-nix
- https://github.com/sioodmy/dotfiles
- https://github.com/colemickens/nixcfg
- https://github.com/divnix/digga
- https://jdisaacs.com/blog/ixos-config/
- https://git.sr.ht/~misterio/nix-config
- https://github.com/TheMaxMur/NixOS-Configuration