my configuration-flake for my nixos server on hetzner cloud
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-14 21:00:37 +02:00
modules caddy subdomain potatoc4.goonen.org 2026-10-14 21:00:37 +02:00
servers lingering 2026-10-08 18:32:08 +02:00
users added a subdomain and changed continerisation-configuration 2026-09-02 21:13:26 +02:00
flake.lock version 1.0 for my vps-infra-flake 2026-06-18 13:15:01 +02:00
flake.nix version 1.0 for my vps-infra-flake 2026-06-18 13:15:01 +02:00
README.md migrated README to .md instead of .org for better forgejo compatibility 2026-10-08 23:05:05 +02:00

vps-infra

Author: celebrimbor from goonen.org infra team

What this flake contains

Server definition

The different servers (only one yet) are configured in the server directory.

To address one of these in nixos-rebuild use .#server-name. For example:

nixos-rebuild switch --flake .#nixos-hel1

For building, the server directory has to contain a configuration.nix and a hardware-configuration.nix. Most common options are set in nixos-hel1's configuration.nix.

Multiple modules

Every system-specific module is defined in the modules directory.

Now existing:

Missing:

  • Networking in general
  • Better config of specific containers???

You can define a module with options.modules inside a nix boiler-plate:

options.modules.nixos.module-example= {
  enable = lib.mkEnableOption "module-example";
};

Note

Use lib in boiler-plate:

{ pkgs, lib, config, ... }: {}

To define the nix-configuration you want to use, set config = lib.mkIf:

config = lib.mkIf config.modules.nixos.port-forwarding.enable {
       #your code here
};

To enable the option you defined, set modules.nixos.<your-module>.enable = true in your configuration.nix.

Important

Insert your module file in inserts in common.nix.

Multiple users

There is no crazy working user-configuration in general.

Existing users: