This repository keep track of my personal NixOS configuration.
flowchart TD
subgraph configuration
nostromo
sanctuary
default
end
subgraph modules
alacritty
bash
git
home-manager
markdown
neovim
rust
sway
end
flake.nix-->nostromo
flake.nix-->sanctuary
nostromo-->home-manager
nostromo-->default
sanctuary-->home-manager
sanctuary-->default
sanctuary-->bash
sanctuary-->markdown
sanctuary-->rust
default-->alacritty
default-->git
default-->neovim
default-->sway
This setup use Flakes so the "entrypoint" is flake.nix
.
The configuration
directory contains configuration specific to the hosts.
- Configuration specific nostromo:
configuration/nostromo
- Configuration specific to sanctuary:
configuration/sanctuary
- Default configuration:
configuration/default.nix
The modules
directory is related to the programs or services optionally imported.
- Module related to alacritty:
modules/alacritty.nix
- Module related to bash:
modules/bash.nix
- Module related to git:
modules/git.nix
- Module related to home-manager:
modules/home-manager.nix
- Module related to markdown:
modules/markdown.nix
- Module related to neovim:
modules/neovim
- Module related to rust:
modules/rust
- Module related to sway:
modules/sway
Rebuild the system from the local repository:
sudo nixos-rebuild switch --flake <path_to_repo>#hostname
The available hostnames available at the moment are:
sanctuary
(x86_64-linux
)nostromo
(aarch64-linux
)
Example: sudo nixos-rebuild switch --flake .config/nixos#sanctuary
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
Example: sudo nixos-rebuild switch --flake github:yozhgoor/nixos#nostromo
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
.
To remove old, unreferenced packages:
nix-collect-garbage
The following command deletes old roots, removing the ability to roll back to them:
nix-collect-garbage -d
sudo nix-collect-garbage -d
To delete all historical versions you can use
sudo nix profile wipe-history
You can manually optimize the store using:
nix-store --optimise