Switch to the dendritic flake-parts layout, with stubs for phase 2
flake.nix now only declares inputs and calls flake-parts with import-tree
over ./modules: every .nix file under modules/ is a flake-parts module.
Features are aspects (flake.modules.nixos.<name> and
flake.modules.homeManager.<name>); importing an aspect enables it, so the
my.* option modules and their enable flags are gone.
- Add the flake-parts glue: modules/flake/ (systems, shared meta data,
host construction through configurations.nixos, overlays, packages,
apps, dev shell, formatter, checks), modules/users/faumaray.nix
(meta.owner) and modules/core/{nixpkgs,home-manager,install-facts}.nix.
config.my is kept as one read-only derived option so install-system
keeps working unchanged.
- Add the aspects that are already final: secrets, ssh, hyprland,
wezterm, git, stylix, proxy-suite, gitea-runner and claude-code, and
the desktop host (modules/hosts/desktop/{host,hardware,disks}.nix).
- Port the always-on basics to the `core` aspect (nix, boot, locale,
networking, users), lanzaboote and plain systemd-boot to the
`secure-boot` and `systemd-boot` aspects, and the installer ISO to
modules/installer/iso.nix. Behaviour is unchanged; the time zone,
default locale, XKB layouts and the firewall setting now live in
modules/hosts/desktop/host.nix.
- Move the Lua files (Hyprland settings, binds, rules; Neovim init.lua)
with git mv, byte-identical.
- Add bare stubs, marked STUB, for the aspects that the next phase
ports: amd, rocm, gaming, vpn, docker, noctalia, audio, fonts, xdg,
apps, shell and neovim. The host evaluates with them, but those
features are not configured until they are ported.
- Remove lib/, overlays/, apps/, modules/nixos/, modules/home/,
modules/installer/default.nix and hosts/desktop/{default,disks,home}.nix.
- flake.lock: add flake-parts, import-tree, stylix and serena with their
transitive inputs (22 new nodes); every existing pin is unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZ16yf4acmaSiHq81vyQ6Z
This commit is contained in:
84 files changed
+2121
-1928
No files matched your search
@@ -0,0 +1,4 @@
|
||||
# STUB (T2): replaced in phase 2
|
||||
{
|
||||
flake.modules.nixos.docker = { };
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
# Gitea Actions runner "performance" for git.faumaray.com, running jobs in
|
||||
# rootful Docker (dev/docker.nix). The registration token is an agenix secret:
|
||||
# secrets/gitea-runner-token.age one line `TOKEN=<registration token>`
|
||||
# (nix run .#secret-from-file -- gitea-runner-token.age <file>)
|
||||
# Without that file the runner is not configured and a warning says so.
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
tokenSecret = config.meta.secretsDir + "/gitea-runner-token.age";
|
||||
hasToken = builtins.pathExists tokenSecret;
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.gitea-runner =
|
||||
{ config, ... }:
|
||||
{
|
||||
age.secrets = lib.optionalAttrs hasToken {
|
||||
gitea-runner-token = {
|
||||
file = tokenSecret;
|
||||
mode = "0400";
|
||||
};
|
||||
};
|
||||
|
||||
# An instance without token or tokenFile fails the upstream assertion, so
|
||||
# the instance only exists when the secret does.
|
||||
services.gitea-actions-runner.instances = lib.optionalAttrs hasToken {
|
||||
performance = {
|
||||
enable = true;
|
||||
url = "https://git.faumaray.com";
|
||||
name = "Perfrormance Runner";
|
||||
tokenFile = config.age.secrets.gitea-runner-token.path;
|
||||
labels = [
|
||||
"ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest"
|
||||
"voelin-release:docker://docker.gitea.com/runner-images:ubuntu-latest"
|
||||
"ubuntu-24.04:docker://docker.gitea.com/runner-images:ubuntu-24.04"
|
||||
"ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04"
|
||||
"echoion-release-serial:docker://git.faumaray.ru/void/echoion-release-builder:gcc-16.1.0"
|
||||
];
|
||||
settings = {
|
||||
runner = {
|
||||
capacity = 5;
|
||||
timeout = "3h";
|
||||
fetch_timeout = "5s";
|
||||
fetch_interval = "1s";
|
||||
};
|
||||
cache = {
|
||||
enabled = true;
|
||||
host = "192.168.255.242"; # or "localhost" if not using isolated docker containers
|
||||
port = 8088;
|
||||
dir = "/var/lib/gitea-runner/cache";
|
||||
};
|
||||
container = {
|
||||
# Ensure the job container passes standard bridge mode
|
||||
network_mode = "bridge";
|
||||
|
||||
# Provide the job containers an alias to reach the host system
|
||||
options = "--add-host=host.docker.internal:host-gateway";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
warnings = lib.optional (!hasToken) ''
|
||||
The Gitea Actions runner "performance" is not configured: secrets/gitea-runner-token.age
|
||||
is missing. Put `TOKEN=<new registration token>` in a file, then
|
||||
`nix run .#secret-from-file -- gitea-runner-token.age <file>` and `git add` it.
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user