This repository contains NixOS configurations for my personal computers / servers.
It contains nixos configurations for the following hosts:
| Host name | Type | Comment |
|---|---|---|
| interstellar | desktop | My personal laptop |
| john | desktop | My personal desktop |
| nanorion | server | Scaleway bare metal server |
It also contains my dotfiles, that I manage with GNU stow. I don't manage my dotfiles with nix because I have a work machine I can't use nix on, so I just keep the dotfiles separate.
The nix part of this repo uses the dentritic pattern, or at least my interpretation of it. To implement it, I used the following ressources:
- Mightyjam's dentritic repository
- Doc Steve's guide on dentritic design with flake parts
- Gaetan Lepage's nix config
- Drupol's 'Refactoring My Infrastructure As Code Configurations' article
- Drupol's infra repository
All of the nix code is in the modules directory, and imported automatically using
Vic's import-tree
In the modules directory, every file is a 'feature' in dentritic terms, and each type of feature is
highlighted
by the different directories. A feature may apply to personal computers, to servers
or to both. When a feature has specific configuration for the server machine type,
the associated module is suffixed with -server (example: boot.nix)
The dotfiles are contained in the dotfiles directory. The structure of the directory
follows the structure of my home directory, allowing me to run:
stow -t ~ dotfiles
To symlink my dotfiles.
For desktop configurations:
sudo nixos-rebuild switch --flake .#<configuration-name>For server configurations:
nixos-rebuild switch --flake .#<configuration-name> --target-host "root@<server-ip>"Zsh plugin managers are overkill, I just clone what I need:
git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.zsh/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-history-substring-search ~/.zsh/zsh-history-substring-search