Nixos configs and packages
  • Nix 97.2%
  • Shell 2.8%
Find a file
2026-10-14 19:16:07 +02:00
.github removing home-manager deps 2026-10-09 17:57:09 +02:00
hardware small fixes 2026-05-03 20:48:28 +02:00
modules update readme 2026-10-14 19:16:07 +02:00
secrets added base forgejo config 2026-10-14 18:51:06 +02:00
.gitignore Added pre-commit to format nix code 2026-05-02 19:34:45 +02:00
.sops.yaml secrets refactor, syncthing config, and nvim config update 2026-10-11 08:07:24 +02:00
build.sh fixing files with pre-commit 2026-05-02 22:07:29 +02:00
flake-bump.sh fixing files with pre-commit 2026-05-02 22:07:29 +02:00
flake.lock flake update 2026-10-11 19:54:24 +02:00
flake.nix removing home-manager deps 2026-10-09 17:57:09 +02:00
README.md update readme 2026-10-14 19:16:07 +02:00

Flake-check

NixOS Configuration

This repository contains a modular NixOS configs and packages built with:

  • Nix Flakes
  • flake-parts
  • nix-wrapper-modules
  • import-tree
  • sops-nix

The configuration follows a feature → profile → host architecture.


Machines

NixOS Hosts

Host Description
zeno Main desktop
aurele Laptop
mark VPS / server

Architecture

features → profiles → hosts
  • features: small reusable modules (ntp, tailscale, etc.)
  • profiles: reusable bundles (base, desktop, server)
  • hosts: final machine configurations
  • packages: wrapped packages (nvim, niri, etc.)

Project Structure

Targeted modules Structure

modules/
├── nixos/
│   ├── features/
│   ├── profiles/
hosts/
packages/

Design Notes

  • import-tree is used only for flake modules and reusable components
  • hardware configurations are isolated in hardware/
  • files prefixed with _ are ignored by import-tree
  • modules/ contains reusable logic

Secrets (SOPS)

Required key file:

/var/lib/sops-nix/keys.txt

Edit secrets

export SOPS_AGE_KEY_FILE=/var/lib/sops-nix/keys.txt
nix-shell -p sops --run "sops secrets/thesecretfile.yaml"


Prerequisites

Enable flakes

https://nixos.wiki/wiki/flakes

Configure binary caches

Add the following to /etc/nix/nix.conf:

trusted-users = root anthony

substituters = https://datantho-nixos.cachix.org https://dat-antho-shared.cachix.org https://dat-antho-mark.cachix.org https://dat-antho-zeno.cachix.org https://dat-antho-aurele.cachix.org https://cache.nixos.org https://nix-community.cachix.org

trusted-public-keys = datantho-nixos.cachix.org-1:e1Wvy2MQcqrTm5Vedsat55IrNNZRqYvJppfbjMECXOE= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= dat-antho-shared.cachix.org-1:OwZBh4RgqUCqhpPTLfOobK9ZZ+J00O/QElfty7ugyJE= dat-antho-mark.cachix.org-1:RM8g7Bt+5ZMNEr0lDbdZgSwlkjxmkJhNch9YJma+5Bc= dat-antho-aurele.cachix.org-1:fBRYiSUL8AHbNC45x6BZpgc3bJpztGT7tp5p615zW7s= dat-antho-zeno.cachix.org-1:9ULNh7pIZKUoY4GuMLEfkuZgNFH/bmfrQEM/6eHgS7g=

Usage

NixOS systems

Switch:

nh os switch .#<host>

Example:

nh os switch .#zeno

Dry run:

nh os test .#zeno

Build only:

nh os build .#zeno

Using nixos-rebuild

sudo nixos-rebuild switch --flake .#<host>

Example:

sudo nixos-rebuild switch --flake .#aurele

Using the packages and nix profile

A package with common dev tools is exposed to install it use :

nix run "git+https://git.anthonyhengy.fr/anthony/nixos-config.git#nvim"
nix profile add "git+https://git.anthonyhengy.fr/anthony/nixos-config.git#dev-tools"
ls -l ~/.nix-profile/bin/ # to list available packages