asgard
IMPORTANT
This configuration is under constant construction so some things may be remove or add accordings to my needs but i want to keep all even if it's not used anymore.
Since this configuration is made for my own needs, you can take inspiration and some configuration but do not expect it to work on your side.
Any damage caused by this configuration is not my responsibility, so use it at your own risks.
Table of Contents#
- Features & Capabilities
- Machines
- Installation
- Folder Structure
- Commands
- Documentations
- Troubleshooting
Features & Capabilities#
This repository want this to be multi-user and multi-host so there is some workaround to make things work like i want and keep it simple.
- NixOS
- Nix Darwin
- WSL (not used anymore)
- Nix BSD (in wait of a stable state to be used anywhere else than a vm)
- MicroVM for servers (astro/microvm)
- Secrets management (agenix)
- Secure Boot (lanzaboot)
- Persistant storage (impermanence)
- Disk configuration (disko)
- Encrypted disks (?)
- Home management (hjem)
- [-] Automatic updates (cannot be entirely done, since tangled does not support pipeline based on time.)
- Network topology (nix-topology)
Installation#
TODO: write the documentation to install easely a new host with a few steps
Machines#
| Hostname | Motherboard | CPU | GPU | RAM | OS | Usage | Status |
|---|---|---|---|---|---|---|---|
andhrimnir |
Aorus B450 Elite | AMD Ryzen 3 3300X | Nvidia 1060 | 16Go | ❄️ | 🖥️ - 🎮️ | 🟢️ |
elli |
HP ProDesk 400 G1 DM | Intel Pentium G3250T | - | 8Go | ❄️ | 💾️ | 🟠 |
loki |
ASUS ROG STRIX B760-I GAMING WIFI | Intel i5 13600kf | Nvidia 4070ti | 32Go | ❄️ | 🎮️ | 🟢️ |
nanna |
Lenovo Legion Y530 15ICH | Intel i5 | Nvidia 1050ti | 16Go | ❄️ | 🖥️ - 🎮️ | 🟢️ |
njord |
- | Apple M2 Pro | Apple M2 Pro | 32Go | 🍎️ | 🖥️ | 🟢️ |
sunna |
ASUS ROG STRIX G15 | Intel i7 10870H | Nvidia 2060 | 16Go | ❄️ | 🖥️ | 🔴 |
syn |
Raspberry Pi3 b+ | - | - | 1Go | ❄️ | 💾️ | 🔴 |
vali |
WSL | - | - | - | ❄️ | 💾️ | 🔴 |
Annotations
- 🎮️ : Gamingstation
- 💾️ : Server
- ☁️ : Virtual Machime
- 🖥️ : Workstation
- 🧨️ : Testing purpose
- ❄️ : NixOS
- 🍎️ : MacOS
- 👹️ : FreeBSD with NixBSD
Folder structure#
This repository use a dentritic pattern to make everything work with ease. With this pattern, every file is a modules (modules, configurations, ...), so everything needs to be inside the modules folders and imported as it.
The only things not treated as it are the custom packages inside the packages folder.
NOTE
This is my current idea of what will look the folders, it can change in the future.
.
├── modules/
│ ├── features/ # Feature definitions
│ ├── hjem/ # Hjem modules (not using flake-parts modules)
│ ├── hosts/ # machines configurations
│ ├── lib/ # Custom library (mostly factories)
│ ├── packages/ # Custom packages derivations (per-system)
│ ├── tools/ # Basic tools configurations (flake-parts, hjem, impermanence, ...)
│ ├── users/ # Users configurations
│ └── default.nix # Modules entrypoint with auto-import
├── secrets/ # Secrets files used by agenix
│ └── secrets.nix # Secrets entrypoint
├── flake.nix # Configuration entrypoint
└── justfile # Command helper
Commands#
You can get all recipes using the just command and running one of the available commands below with just <command> <arguments*>:
Available recipes:
boot hostname=hostname # Build a new configuration
clean # Cleanup all unused packages and generations
format # Format code
size # Print size of the nix store
switch hostname=hostname # Rebuild the system
update # Update dependencies
Documentations#
These are the things that help me the most to understand Nix ecosystem and help me build my configuration from scratch.
You can retrieve dotfiles that inspired me inside my dotfiles star list.
Troubleshooting#
- If the rebuild command failed because an experimental feature is disabled use this command:
sudo -E NIX_CONFIG="experimental-features = nix-command flakes pipe-operators" nixos-rebuild switch --flake .