Skip to content

mccurdyc/nixos-config

Repository files navigation

mccurdyc nixos-config

Inspiration

References

NixOS

Nixpkgs

Nix-Darwin

Home-manager

Nix

Other

Installation Docs

Common Commands

faamac Rebuild

sudo darwin-rebuild switch --flake '.#faamac'

I've run into situations where I needed to clean old generations.

sudo nix-env --delete-generations old \
  --profile /nix/var/nix/profiles/system \
  && nix-collect-garbage -d

fgnix Rebuild

sudo nixos-rebuild switch --flake '.#fgnix'
# nixos-rebuild switch \
#   --flake 'github:mccurdyc/nixos-config#fgnix'

funix Rebuild

Standalone home-manager on an Ubuntu VM (not NixOS).

home-manager switch --flake '.#funix'

Update Flake

nix flake update --commit-lock-file

Formatting

nix fmt

Testing

Checks are exposed under checks.<system>.<name> and run by nix flake check.

Check Kind Systems
fgnix NixOS VM test (boots the config, asserts nftables) x86_64-linux
nuc NixOS VM test (boots the config, asserts nftables) x86_64-linux
funix Eval-only (builds activationPackage) x86_64-linux
faamac Eval-only (builds darwin system drv) aarch64-darwin

Eval all checks (no build, fast)

nix flake check --no-build

Run all checks (builds and executes VM tests)

nix flake check

Run a single check

nix build '.#checks.x86_64-linux.fgnix'
nix build '.#checks.x86_64-linux.nuc'
nix build '.#checks.x86_64-linux.funix'
nix build '.#checks.aarch64-darwin.faamac'  # on macOS only

Interactive debugging (drop into a running VM)

nix build '.#checks.x86_64-linux.fgnix.driver'
./result/bin/nixos-test-driver --interactive
(repl) fgnix.start()
(repl) fgnix.shell_interact()

Reference: https://blog.thalheim.io/2023/01/08/how-to-execute-nixos-tests-interactively-for-debugging/

About

❄️ My NixOS configs.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages