Modular config for my system and HA k3s cluster
Find a file
r0chd b76eb3c8ce
Some checks failed
weekly-update.yml / hai (push) Failing after 0s
Compile k3s manifests / Flake check (push) Failing after 26s
Flake check / Flake check (push) Failing after 29s
hai
2026-02-09 08:16:27 +01:00
.forgejo/workflows terraforming so much 2026-02-03 19:40:30 +01:00
hosts hai 2026-02-09 08:16:27 +01:00
infra ntfy 2026-02-08 19:34:21 +01:00
modules hai 2026-02-09 08:16:27 +01:00
utils I dont fucking know 2026-01-21 03:32:25 +01:00
.envrc mainly nushell fixes 2025-09-02 00:03:59 +02:00
.gitignore fix ssh keys 2025-11-09 22:46:55 +01:00
configuration.nix idk de-srv-1 ig? 2026-02-08 15:22:39 +01:00
flake.lock finally fucking flux 2026-02-04 15:56:26 +01:00
flake.nix hai 2026-02-09 08:16:27 +01:00
LICENSE Declarative iwd 2025-06-03 16:55:37 +02:00
README.md thank you ai for decent readme 2025-06-27 20:40:59 +02:00

🐧 Modular NixOS Configuration

This repository uses a modular structure for managing NixOS and Home Manager configurations with support for multiple hosts and users.


📁 Project Structure

  • ./configuration.nix Main entrypoint for defining:

    • Hosts and users
    • Flake output generation
    • Cross-cutting system & user settings (e.g. shells)
  • ./hosts/${hostname}/default.nix Host-specific NixOS system settings

  • ./hosts/${hostname}/users/${username}/default.nix User-specific settings under each host


🚀 Usage

🖥️ Create a New Host

mkHost

Creates a new host scaffold under ./hosts.


👤 Create a New User

mkUser

Adds a new user configuration under the given host directory.


⚙️ Configure a Host

Edit your configuration.nix found at root level of repository and add a host definition:

{ ... }: {
  hosts.my_hostname = {
    arch = "x86_64-linux";
    type = "desktop";
    platform = "nixos";
    users = {
      my_user = {
        root.enable = true;
        shell = "zsh";
      };
    };
  };
}

☁️ Remote Installation (Terraform)

Deploy with Terraform

Initialize and apply the Terraform setup for provisioning:

terraform init
terraform apply