# Nix configuration

## Updating

Update flake

    nix flake update --commit-lock-file

Switch current machine

    sudo nixos-rebuild switch --flake . --show-trace

Switch current home manager

    home-manager switch --flake . --show-trace

Switch server

    nixos-rebuild switch --target-host root@posixlycorrect.com --use-substitutes --show-trace --flake .\#vps


## Cleanup

Collect garbage (run with sudo to collect root garbage)

    nix-collect-garbage -d


## Submodule management

Trivionomicon

    git subtree push --prefix=trivionomicon forgejo@git.posixlycorrect.com:deepState/trivionomicon.git master
    git subtree pull --prefix=trivionomicon forgejo@git.posixlycorrect.com:deepState/trivionomicon.git master

Homepage

    git subtree push --prefix=homepage forgejo@git.posixlycorrect.com:fabian/homepage.git master
    git subtree pull --prefix=homepage forgejo@git.posixlycorrect.com:fabian/homepage.git master


## About
This is a unification of my old configs, which had a combined 506 commits.
