diff --git a/.gitignore b/.gitignore index f8bdd5f..9634436 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ __pycache__ scripts .temp +.opencode/ \ No newline at end of file diff --git a/configurations/mini-laptop.nix b/configurations/mini-laptop.nix index 73b1ca2..a910609 100644 --- a/configurations/mini-laptop.nix +++ b/configurations/mini-laptop.nix @@ -53,17 +53,17 @@ enable = true; bridge.address = "10.66.0.1"; bridge.prefixLength = 24; - bootloader.ipxeBinary = "snp.efi"; # SNP-only build, 310K, virtio-net-friendly + bootloader.ipxeBinary = "snp.efi"; # SNP-only build, 310K, virtio-net-friendly vm = { enable = true; - autostart = false; # start manually when testing - memory = "4G"; # iPXE needs 2G+ heap to sanboot a 2G raw image + autostart = false; # start manually when testing + memory = "4G"; # iPXE needs 2G+ heap to sanboot a 2G raw image }; dhcp.guests = [ { - mac = "52:54:00:12:34:56"; - ip = "10.66.0.10"; - hostname = "pxe-vm-01"; # optional + mac = "52:54:00:12:34:56"; + ip = "10.66.0.10"; + hostname = "pxe-vm-01"; # optional } ]; }; diff --git a/devshells/default.nix b/devshells/default.nix index 8571c0c..e499ef3 100644 --- a/devshells/default.nix +++ b/devshells/default.nix @@ -11,7 +11,9 @@ let system = "x86_64-linux"; pkgs = import inputs.nixpkgs { inherit system; - config = { allowUnfree = true; }; + config = { + allowUnfree = true; + }; }; in { @@ -35,7 +37,7 @@ in # shell globally. Anything npm-side goes through `npm install` in the # project's own node_modules. -shellHook = '' + shellHook = '' # Skip Playwright's own browser download — we use the system one. export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 diff --git a/flake.lock b/flake.lock index a905d48..fb8c4fb 100644 --- a/flake.lock +++ b/flake.lock @@ -382,6 +382,22 @@ "type": "github" } }, + "nixpkgs-master": { + "locked": { + "lastModified": 1791887696, + "narHash": "sha256-YtLWq4aLuG9AThbfbD0c6p0IaWW4OZHykTw6s0j0kaA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1f4c563e0090f96a675bf1806c3c7ea3ae797bb5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, "nmd": { "inputs": { "nixpkgs": [ @@ -482,6 +498,7 @@ "nixos-hardware": "nixos-hardware", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs", + "nixpkgs-master": "nixpkgs-master", "plasma-manager": "plasma-manager", "proxy-suite": "proxy-suite", "sops-nix": "sops-nix", diff --git a/flake.nix b/flake.nix index 1c316ca..70f1af0 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { # nixpkgs nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - # nixpkgs-master.url = "github:NixOS/nixpkgs/master"; + nixpkgs-master.url = "github:NixOS/nixpkgs/master"; # nixpkgs-last-unstable.url = "github:NixOS/nixpkgs/3497aa5c9457a9d88d71fa93a4a8368816fbeeba"; # nixpkgs-fingerprint.url = "github:NixOS/nixpkgs/nixos-24.11"; diff --git a/home/modules/opencode.nix b/home/modules/opencode.nix index 8d43b81..9dde64b 100644 --- a/home/modules/opencode.nix +++ b/home/modules/opencode.nix @@ -1,11 +1,11 @@ # Declarative OpenCode + oh-my-openagent (oh-my-opencode) + # @bybrawe/opencode-loop plugin setup. # -# Workstation runs OpenCode 2.x (V2 schema, `plugins` plural); sapphira -# runs OpenCode 1.18.x (V1 schema, `plugin` singular). The two hosts -# intentionally diverge in the `settings` block until nixpkgs ships V2 — -# see the comment above `settings` below. The `tui` block already uses -# V1-compatible `plugin` (singular) on both hosts. +# Sapphira runs OpenCode 1.18.x (V1 schema, `plugin` singular) via +# pkgs.opencode. Workstation (vetymae) is on OpenCode 1.19.x — same V1 +# schema, same `plugin` (singular) field. Both hosts use the V1-compatible +# `plugin` (singular) key. If/when nixpkgs ships OpenCode 2.x (V2 schema, +# `plugins` plural), switch the `settings` block below accordingly. # # Mirrors ~/.config/opencode/ on the current workstation. # Imported by home/server.nix (sapphira). Auto-enables programs.opencode. @@ -46,6 +46,7 @@ let _migrations = [ "2026-07-opencode-config-unification" "2026-08-reasoning-unification" + "2026-09-category-deep-split" ]; agents = { @@ -179,7 +180,7 @@ let } ]; }; - deep = { + "deep-low" = { model = "minimax-coding-plan/MiniMax-M3.1-Flash-Preview"; variant = "medium"; fallback_models = [ diff --git a/modules/essentials/packages.nix b/modules/essentials/packages.nix index d49892f..efe36b8 100644 --- a/modules/essentials/packages.nix +++ b/modules/essentials/packages.nix @@ -113,7 +113,7 @@ programs = { # nix-ld.enable = true; justray = { - enable = true; + enable = false; }; nano = { enable = true; diff --git a/modules/pxe-infra/dhcp.nix b/modules/pxe-infra/dhcp.nix index 7a7b67c..182557d 100644 --- a/modules/pxe-infra/dhcp.nix +++ b/modules/pxe-infra/dhcp.nix @@ -23,14 +23,13 @@ let # Build dhcp-host entries with a `known` tag attached, so when # authoritative = false we can drop everything else. - dhcpHostLines = map - (g: - let - body = if g.hostname != null - then "${g.mac},${g.ip},${g.hostname}" - else "${g.mac},${g.ip}"; - in "${body},set:known") - cfg.guests; + dhcpHostLines = map ( + g: + let + body = if g.hostname != null then "${g.mac},${g.ip},${g.hostname}" else "${g.mac},${g.ip}"; + in + "${body},set:known" + ) cfg.guests; # Free address pool. Always set so dnsmasq actually opens # its DHCP server socket — without a `dhcp-range` line, dnsmasq @@ -39,13 +38,14 @@ let # (dhcp-ignore=tag:!known) below, so unknown MACs never see a # lease, but the range must exist. dhcpRange = - if cfg.rangeStart != null && cfg.rangeEnd != null - then [ "${cfg.rangeStart},${cfg.rangeEnd},${cfg.leaseTime}" ] + if cfg.rangeStart != null && cfg.rangeEnd != null then + [ "${cfg.rangeStart},${cfg.rangeEnd},${cfg.leaseTime}" ] # Default: the entire bridge subnet minus the host address. # Hardcoded for /24 because the bridge defaults to # 10.66.0.1/24; if the bridge address/prefix changes, # update this default. - else [ "10.66.0.2,10.66.0.254,12h" ]; + else + [ "10.66.0.2,10.66.0.254,12h" ]; base = { # Bind to the private bridge only — never 0.0.0.0, never eth0. @@ -81,17 +81,23 @@ let # UEFI firmware in the DHCP offer so the firmware knows what # to TFTP-fetch. Sent to all clients; the `tag:!known` filter # below still drops requests from unknown MACs. - bootSettings = lib.optionalAttrs (config.pxe-infra.tftp.enable && config.pxe-infra.bootloader.enable) { - dhcp-boot = config.pxe-infra.bootloader.ipxeBinary; - }; + bootSettings = + lib.optionalAttrs (config.pxe-infra.tftp.enable && config.pxe-infra.bootloader.enable) + { + dhcp-boot = config.pxe-infra.bootloader.ipxeBinary; + }; - filtered = base // tftpSettings // bootSettings // lib.optionalAttrs (!cfg.authoritative) { - # Drop any DHCP request not carrying the `known` tag we set on - # static hosts. This is the MAC filter that keeps the rig - # from accidentally serving strangers if a real-LAN packet - # somehow reached the bridge. - dhcp-ignore = "tag:!known"; - }; + filtered = + base + // tftpSettings + // bootSettings + // lib.optionalAttrs (!cfg.authoritative) { + # Drop any DHCP request not carrying the `known` tag we set on + # static hosts. This is the MAC filter that keeps the rig + # from accidentally serving strangers if a real-LAN packet + # somehow reached the bridge. + dhcp-ignore = "tag:!known"; + }; in { config = lib.mkIf (config.pxe-infra.enable && cfg.enable) { diff --git a/modules/pxe-infra/http.nix b/modules/pxe-infra/http.nix index 393c6ca..9b06acd 100644 --- a/modules/pxe-infra/http.nix +++ b/modules/pxe-infra/http.nix @@ -21,10 +21,12 @@ enable = true; virtualHosts."pxe-artifacts" = { - listen = [{ - addr = config.pxe-infra.bridge.address; - port = config.pxe-infra.http.port; - }]; + listen = [ + { + addr = config.pxe-infra.bridge.address; + port = config.pxe-infra.http.port; + } + ]; root = "${config.pxe-infra.artifacts.root}/http"; # Directory listing for the artifact tree. Lets the user # point a browser at the bridge IP to see what versions are diff --git a/modules/pxe-infra/report-sink.nix b/modules/pxe-infra/report-sink.nix index a3e5709..64dc5db 100644 --- a/modules/pxe-infra/report-sink.nix +++ b/modules/pxe-infra/report-sink.nix @@ -54,7 +54,10 @@ in ProtectSystem = "strict"; ProtectHome = true; PrivateTmp = true; - RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ]; + RestrictAddressFamilies = [ + "AF_INET" + "AF_INET6" + ]; ReadWritePaths = [ "/var/lib/pxe-infra" ]; }; diff --git a/modules/pxe-infra/vm.nix b/modules/pxe-infra/vm.nix index 67a742c..8a1d339 100644 --- a/modules/pxe-infra/vm.nix +++ b/modules/pxe-infra/vm.nix @@ -75,7 +75,10 @@ "dnsmasq.service" "nginx.service" ]; - path = [ pkgs.qemu pkgs.iproute2 ]; + path = [ + pkgs.qemu + pkgs.iproute2 + ]; serviceConfig = { Type = "simple"; diff --git a/modules/server/gitea.nix b/modules/server/gitea.nix index ec35caa..d51f5ee 100644 --- a/modules/server/gitea.nix +++ b/modules/server/gitea.nix @@ -14,7 +14,10 @@ appName = "ZeroQ Gitea Service"; settings = { server = { - DOMAIN = "git.zeroq.su"; + # nixpkgs-unstable removed `DOMAIN` — must use the full public URL + # in `ROOT_URL` instead. External entry is HTTPS via nginx with + # ACME (modules/server/nginx.nix:53), so scheme is https, no port. + ROOT_URL = "https://git.zeroq.su/"; HTTP_PORT = 3000; }; service.DISABLE_REGISTRATION = true; diff --git a/modules/server/nextcloud.nix b/modules/server/nextcloud.nix index 3a0bb2f..736dc66 100644 --- a/modules/server/nextcloud.nix +++ b/modules/server/nextcloud.nix @@ -6,6 +6,13 @@ xlib, ... }: +let + master = import inputs.nixpkgs-master { + system = "x86_64-linux"; + config.allowUnfree = true; + config.allowUnfreePredicate = true; + }; +in { services = { nextcloud-whiteboard-server = {