The dgnum infrastructure
Find a file
DGNum [bot] cac5518af2
Some checks failed
Check meta / check_dns (pull_request) Successful in 16s
Check meta / check_meta (pull_request) Successful in 18s
Build all the nodes / Jaccess01 (pull_request) Failing after 24s
Run pre-commit on all files / pre-commit (pull_request) Failing after 24s
Build all the nodes / hypervisor03 (pull_request) Failing after 32s
Build all the nodes / build01 (pull_request) Failing after 41s
Build all the nodes / compute01 (pull_request) Failing after 48s
Build all the nodes / hypervisor01 (pull_request) Failing after 57s
Build all the nodes / iso (pull_request) Failing after 1m5s
Build all the nodes / rescue01 (pull_request) Failing after 50s
Build all the nodes / Jaccess04 (pull_request) Failing after 1m24s
Build all the nodes / krz01 (pull_request) Failing after 1m31s
Build all the nodes / web01 (pull_request) Failing after 44s
Build all the nodes / tower01 (pull_request) Failing after 1m9s
Build all the nodes / bridge01 (pull_request) Failing after 2m1s
Run pre-commit on all files / pre-commit (push) Failing after 2m12s
Check workflows / check_workflows (pull_request) Failing after 2m24s
Build all the nodes / storage01 (pull_request) Failing after 2m1s
Build all the nodes / ap01 (pull_request) Failing after 2m43s
Build all the nodes / web02 (pull_request) Failing after 1m47s
Build all the nodes / vault01 (pull_request) Failing after 2m14s
Build all the nodes / lab-router01 (pull_request) Failing after 3m11s
Build all the nodes / geo01 (pull_request) Failing after 3m23s
Build all the nodes / cof02 (pull_request) Failing after 3m34s
Build the shell / build-shell (pull_request) Failing after 2m17s
Build all the nodes / web03 (pull_request) Failing after 2m39s
Build all the nodes / zulip01 (pull_request) Failing after 2m39s
Build all the nodes / netcore02 (pull_request) Failing after 3m59s
Build all the nodes / netcore01 (pull_request) Failing after 4m12s
Build all the nodes / hypervisor02 (pull_request) Failing after 4m37s
Build all the nodes / geo02 (pull_request) Failing after 4m52s
lon: update nixos-unstable
3e3afe5174c561dee0df6f2c2b2236990146329f
→ 3016b4b15d13f3089db8a41ef937b13a9e33a8df

Last 50 commits:
  81c9af4 gtkd: avoid with lib;
  e171f08 terragrunt: 0.81.8 -> 0.82.3 (#420909)
  c28b140 swayimg: 4.2 -> 4.3 (#420902)
  c7327b1 python3Packages.requirements-parser: 0.11.0 -> 0.13.0 (#410485)
  4baf968 kubexporter: 0.6.4 -> 0.6.5
  74fc212 python3Packages.anyascii: 0.3.2 -> 0.3.3
  d26cb83 python3Packages.pushover-complete: 1.2.0 -> 2.0.0 (#412237)
  a930333 signal-desktop-bin: 7.58.0 -> 7.59.0 (#420245)
  87a4e1f python3Packages.anyascii: 0.3.2 -> 0.3.3 (#420927)
  c82b750 teams/kodi: remove sephalon
  d0c18c0 sccmhunter: use python3.12
  224a1e7 structurizr-cli: init at 2025.05.28  (#417630)
  5a7a0b4 teams/kodi: remove sephalon (#420931)
  074b333 python3Packages.bibtexparser_2: init at 2.0.0b8
  5293ede python3Packages.clldutils: 3.21.0 -> 3.24.2
  e185b87 python3Packages.clldutils: modernize
  a48741b libetonyek: enable strictDeps / parallel building, clean up (#420169)
  1aff5d6 gemini-cli: fix file collisions
  c8a1b81 lmstudio: 0.3.16.8 -> 0.3.17.11
  3c8b36a nezha-agent: 1.12.3 -> 1.13.0 (#420900)
  7c45aa9 rerun: 0.23.3 -> 0.23.4 (#420359)
  ef9cba9 glab: 1.60.2 -> 1.61.0
  0ba0452 nchat: 5.7.24 -> 5.8.4 (#420817)
  8f6be61 eza: 0.21.5 -> 0.21.6
  721ad15 python3Packages.hawkmoth: init at version 0.21.0 (#385824)
  dd55409 glab: 1.60.2 -> 1.61.0 (#420427)
  2db497a heynote: 2.2.2 -> 2.3.2
  afe1980 lmstudio: 0.3.16.8 -> 0.3.17.11 (#420934)
  ea5887d mattermostLatest: 10.9.1 -> 10.9.2 (#420222)
  b8bff8a python3Packages.clldutils: 3.21.0 -> 3.24.2 (#420728)
  6af3d14 zed-editor: 0.192.6 -> 0.192.7 (#420897)
  2c2bded clever-tools: 3.13.0 -> 3.13.1
  c00b8eb python312Packages.parsedatetime: refactor (#420862)
  398a31d python313Packages.polyswarm-api: remove future (#420863)
  dcd01ae python313Packages.pygreat: refactor (#420860)
  c8b8408 python313Packages.hcloud: 2.5.2 -> 2.5.3 (#420859)
  e5d197d python313Packages.yte: 1.8.1 -> 1.9.0 (#420850)
  1655cd7 python313Packages.mscerts: 2025.5.28 -> 2025.6.27 (#420846)
  dbf0c54 vuls: 0.32.0 -> 0.33.1 (#420842)
  0eb0eec python313Packages.youtokentome: 1.0.6 -> 1.0.7 (#420841)
  a299326 python313Packages.tencentcloud-sdk-python: 3.0.1409 -> 3.0.1410 (#420830)
  7567d87 ldeep: 1.0.86 -> 1.0.87 (#420829)
  c7d529f python312Packages.mypy-boto3-*: updates (#420828)
  4f46aa8 buf: 1.53.0 -> 1.55.1
  b9b5b74 protobuf_26: remove
  aa18ed2 gtkd: 3.10.0 -> 3.11.0
  b330496 sarasa-gothic: 1.0.30 -> 1.0.31 (#420820)
  7c93458 gtkd: use finalAttrs
  53bc90c tilix: fix build
  2ac2ae7 cargo-careful: 0.4.7 -> 0.4.8 (#420753)
2025-07-06 11:23:51 +02:00
.forgejo/workflows feat(workflows/lon-update): Set label for lon-bot PRs 2025-06-12 17:31:22 +02:00
lib feat(nix-patches): Reimplement pkgs.applyPatches 2025-06-13 11:02:05 +02:00
LICENSES feat(monitoring/snmp): pdu monitoring 2025-06-21 09:10:22 +02:00
machines fix(gestiocof): pin old version of python.[channels channels-redis] 2025-07-04 18:31:46 +02:00
meta feat(krz01): Upgrade to nixos-unstable 2025-07-02 18:30:52 +02:00
modules feat(activation): Use lix-diff instead of nvd 2025-07-06 10:55:19 +02:00
patches fix(patches/kanidm-provision): feature has been upstreamed 2025-07-02 18:30:52 +02:00
pkgs feat(lon): Init from npins 2025-06-11 23:00:50 +02:00
scripts feat(scripts): Add rekey-all 2025-05-19 10:03:12 +02:00
workflows feat(workflows/lon-update): Set label for lon-bot PRs 2025-06-12 17:31:22 +02:00
.envrc feat(workflows): Switch to a nix-based definition of workflows 2024-11-11 17:57:23 +01:00
.gitattributes feat(monitoring/snmp): pdu monitoring 2025-06-21 09:10:22 +02:00
.gitignore fix(infra): remove untrackable file 2024-02-17 22:56:25 +01:00
bootstrap.nix feat(lon): Init from npins 2025-06-11 23:00:50 +02:00
CONTRIBUTE.md chore: Add license and copyright information 2024-12-13 12:41:38 +01:00
cz.toml fix(comitizen): Allow lon related commits 2025-06-24 12:11:00 +02:00
default.nix fix(nix-reuse): Customization of the hook is no longer necessary 2025-07-06 11:14:11 +02:00
hive.nix feat(activation): Use lix-diff instead of nvd 2025-07-06 10:55:19 +02:00
keys.nix fix(keys): Make it so agenix works again 2025-02-13 17:38:12 +01:00
lon.lock lon: update nixos-unstable 2025-07-06 11:23:51 +02:00
lon.nix feat(lon): Init from npins 2025-06-11 23:00:50 +02:00
README.md chore: Refactor meta to a module architecture 2025-02-06 13:08:04 +01:00
REUSE.toml feat(compute01/librenms): remove 2025-07-02 18:30:52 +02:00
shell.nix feat(nix): Use passthru for shells and return to importing the scripts 2024-11-14 22:18:40 +01:00

❄️ infrastructure

The dgnum infrastructure.

Contributing

Some instruction on how to contribute are available (in french) in /CONTRIBUTE.md. You're expected to read this document before commiting to the repo.

Some documentation for the development tools are provided in the aforementioned file.

Using the binary cache

Add the following module to your configuration (and pin this repo using your favorite tool: npins, lon, etc...):

{ lib, ... }:
let
  dgnum-infra = PINNED_PATH_TO_INFRA;
in {
  nix.settings = (import dgnum-infra { }).mkCacheSettings {
    caches = [ "infra" ];
  };
}

Adding a new machine

The first step is to create a minimal viable NixOS host, using tha means necessary. The second step is to find a name for this host, it must be unique from the other hosts.

Tip

For the rest of this part, we assume that the host is named host02

Download the keys

The public SSH keys of host02 have to be saved to keys, preferably only the ssh-ed25519 one.

It can be retreived with :

ssh-keyscan address.of.host02 2>/dev/null | awk '/ssh-ed25519/ {print $2,$3}'

Initialize the machine folder and configuration

  • Create a folder host02 under machines/
  • Copy the hardware configuration file generated by nixos-generate-config to machines/host02/_hardware-configuration.nix
  • Create a machines/host02/_configuration.nix file, it will contain the main configuration options, the basic content of this file should be the following
{ lib, ... }:

lib.extra.mkConfig {
  enabledModules = [
    # List of modules to enable
  ];

  enabledServices = [
    # List of services to enable
  ];

  extraConfig = {
    services.netbird.enable = true;
  };

  root = ./.;
}

Fill in the metadata

Network configuration

The network is declared in meta/network.nix, the necessary hostId value can be generated with :

head -c4 /dev/urandom | od -A none -t x4 | sed 's/ //'

Other details

The general metadata is declared in meta/nodes.nix, the main values to declare are :

  • site, where the node is physically located
  • stateVersion
  • nixpkgs, the nixpkgs version to use

Initialize secrets

Create the directory secrets in the configuration folder, and add a secrets.nix file containing :

(import ../../../keys.nix).mkSecrets [ "host02" ] [
  # List of secrets for host02
]

This will be used for future secret management.

Update encrypted files

Both the Arkheon, Netbox and notification modules have secrets that are deployed on all machines. To make those services work correctly, run in modules/dgn-records, modules/dgn-netbox-agent and modules/dgn-notify :

agenix -r

Commit and create a PR

Once all of this is done, check that the configuration builds correctly :

colmena build --on host02

Apply it, and create a Pull Request.