This repository keeps track of my personal NixOS configuration.
This setup use Flakes so the "entrypoint" is flake.nix.
The configuration directory contains configuration specific to the hosts:
- Configuration specific to sanctuary:
configuration/sanctuary - Configuration specific to atlantis:
configuration/atlantis - Default configuration for all hosts:
configuration/default.nix
The modules directory is related to the programs or services optionally imported.
The [dev shells][dev_shells] file is related to development shells available on the system. For
example, you can enter a dev shell with:
nix develop <path_to_repo>#rust
The archives directory is related to older files not used in the current configuration.
Rebuild the system from the local repository:
sudo nixos-rebuild switch --flake <path_to_repo>#hostname
Note that <path_to_repo> can be the path to the local repository but also the remote repository:
sudo nixos-rebuild switch --flake github:owner/repo#hostname
You can upgrade NixOS to the latest version by running:
nixos-rebuild switch --upgrade --flake <path_to_repo>#hostname
Note that auto-upgrade is enabled in configuration/default.nix.
The following command deletes old unreferenced packages and old roots, removing the ability to roll back to them:
nix-collect-garbage -d
sudo nix-collect-garbage -d
Note that gc.automatic is enabled in configuration/default.nix.
You can manually optimize the store using:
nix-store --optimise
Note that auto-optimise-store is enabled in configuration/default.nix.