Repository containing our nix infrastructure configuration. It simply provides nixosConfigurations for each host and can be easily deployed using tools like infra-rebuild, bij or even nixos-rebuild.
  • Nix 97.8%
  • Python 2.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
June 2ed61efb36
flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/9bb52223f4f6a0cc606fd0852d8784f896c137d5?narHash=sha256-2Cxxgpz1%2BcRgKZJFi12/9LG3aIBN66f2RvFs34Oj/A0%3D' (2026-11-01)
  → 'github:nixos/nixpkgs/f68407657ad294471eb4b2e65d193df26edf729f?narHash=sha256-E%2BXLAfnC7%2Bbdr4qlEgRv6cdGmiqTU5oeFNKCha7epqQ%3D' (2026-11-16)
• Updated input 'nixpkgs-unstable':
    'github:nixos/nixpkgs/5c9de89ec55bff981cb8da1a4ee92b10f1438ffc?narHash=sha256-WDValiY9se78X2Wh7aWWaq/c7HN29U555%2BOKbHEzYrw%3D' (2026-11-02)
  → 'github:nixos/nixpkgs/e21fec321d73511849707a7585e4ea155ee4bf40?narHash=sha256-ySrWnmZB5UsZTYGHHnBjllT05O5iFjElCRS%2BmabtfP0%3D' (2026-11-16)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/60182817ee048ac94b4c68ea76d5ef2e8aac730d?narHash=sha256-Y/JIHTnMlOabDfyaSBubWGLDIVGihLEUuoMhFvQKaDo%3D' (2026-10-26)
  → 'github:Mic92/sops-nix/7c637afdccdf9bcf35c4a2d67b58a77c1fd843a4?narHash=sha256-Y28AMB8lyKjASdJ0BVsR2AqR1cUsVuo8RVVpzHoECho%3D' (2026-11-16)
2026-11-19 12:02:47 +01:00
config disable http2 for hamburg.ccc.de 2026-11-18 18:07:49 +01:00
modules/services/audio audio: fix librespot playback and use avahi for mDNS 2025-08-11 04:18:41 +02:00
patches audio: fix librespot playback and use avahi for mDNS 2025-08-11 04:18:41 +02:00
.editorconfig Add .editorconfig for ensuring some consistency 2024-07-30 01:35:13 +02:00
.gitignore Initial commit. Add configuration for NixOS Proxmox image 2023-09-11 23:20:34 +02:00
.sops.yaml synchronize admin keys with ansible-infra and use SOPS merge 2026-09-24 20:45:22 +02:00
deployment_configuration.json forgejo-actions-runner(host): enable IPv6 support in Docker 2026-04-29 03:08:20 +02:00
flake.lock flake.lock: Update 2026-11-19 12:02:47 +01:00
flake.nix remove mqtt host 2026-11-02 19:31:42 +01:00
LICENSE license this repo under the MIT license 2024-11-14 22:56:50 +01:00
README.md audio: fix librespot playback and use avahi for mDNS 2025-08-11 04:18:41 +02:00

nix-infra

nix infrastructure configuration for CCCHH.

For deployment we're using infra-rebuild.
To easily get a shell with infra-rebuild going, use the following command:

nix shell git+https://git.hamburg.ccc.de/CCCHH/infra-rebuild#infra-rebuild

After that you can simply run the following to deploy e.g. the git and matrix hosts:

infra-rebuild switch git matrix

By default infra-rebuild tries to use the FQDN from the nixosConfiguration of the host for deployment. However to override individual parts of the deployment target, a deployment_configuration.json can be used. This is exactly what we're doing to set the default deployment user to colmena-deploy and have custom target hostnames for Chaosknoten hosts, since they don't have an FQDN defined in their nixosConfiguration.

Setting up secrets with sops-nix for a host

  1. Convert the hosts SSH host public key to an age public key. This can be done by connecting to the host and running:
    cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age
    
  2. Add the resulting age public key to the .sops.yaml as a YAML anchor in keys. It should be named something like: host_age_hostname
  3. Add a new creation rule for the hosts config directory. It should probably have all admin keys and the hosts age key.
    You can use existing creation rules as a reference.
  4. Create a file containing the relevant secrets in the hosts config directory. This can be accomplished with a command similar to this:
    sops config/hosts/hostname/secrets.yaml
    
    Note: Nested keys don't seem to be compatible with sops-nix.
  5. Add the following entry to the modules of the hosts nixosConfiguration:
    sops-nix.nixosModules.sops
    
  6. Create a sops.nix in the hosts config directory containing the following content to include the secrets.yaml:
    { ... }:
    
    {
      sops = {
        defaultSopsFile = ./secrets.yaml;
      };
    }
    
  7. Make sure the sops.nix gets imported. For example in the default.nix.
  8. To use a secret stored under e.g. forgejo_git_smtp_password, you can then do something like the following:
    sops.secrets."forgejo_git_smtp_password" = {
      mode = "0440";
      owner = "forgejo";
      group = "forgejo";
      restartUnits = [ "forgejo.service" ];
    };
    
    This secret would then be available under /run/secrets/forgejo_git_smtp_password on the host.

Build NixOS Proxmox VE Template

Build a new NixOS Proxmox VE Template for the thinkcccore's:

nix build .#proxmox-nixos-template

Build a new NixOS Proxmox VE Template for the chaosknoten:

nix build .#proxmox-chaosknoten-nixos-template

License

This CCCHH nix-infra repository is licensed under the MIT License.
librespot_PR1528_conflicts_resolved.patch is a modified version of librespot PR 1528 and is licensed under the MIT license.