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 4dee017..fb8c4fb 100644 --- a/flake.lock +++ b/flake.lock @@ -13,11 +13,11 @@ ] }, "locked": { - "lastModified": 1789404474, - "narHash": "sha256-UXFQ7tFiwn8sPz0EV4CBB2PCf/ZiGIHWn/6MXk81Lxs=", + "lastModified": 1791381442, + "narHash": "sha256-TQiEqCAQ4bWppfeRGX4O3lwopsgsd2OvcOHTEQRRwEQ=", "owner": "serokell", "repo": "deploy-rs", - "rev": "e760371d631165e7d8de5b0dcf148e21ec4c16f0", + "rev": "45ba3f8c5cb28396fff71671806e2550b464ac86", "type": "github" }, "original": { @@ -46,6 +46,27 @@ "type": "github" } }, + "disko_2": { + "inputs": { + "nixpkgs": [ + "proxy-suite", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1789770686, + "narHash": "sha256-uZkBR7yHdIKUFB5SZdfgh1qkGfI3XmYmI/lTiquxbck=", + "owner": "nix-community", + "repo": "disko", + "rev": "725ea35e410ad83be4931d1bff7e090eacaf3563", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "disko", + "type": "github" + } + }, "flake-compat": { "locked": { "lastModified": 1767039857, @@ -66,11 +87,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1788450739, - "narHash": "sha256-glZLQlzIn1fXH6PazR2iUmTo7kzzyYSshrWhLS9TqCU=", + "lastModified": 1790898470, + "narHash": "sha256-zTwuwezD0w3hpga6a6P8emidzAZFyWqlNeRBlpWOOl8=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "31729ca8cbdb4fa927b34e5f4353e6a83f39e993", + "rev": "024633cd702b10285db5cb19b40ad48d2399ba60", "type": "github" }, "original": { @@ -106,11 +127,11 @@ ] }, "locked": { - "lastModified": 1790128814, - "narHash": "sha256-6Gm9q+wW3E4Ey4F6wEbJAwaMsEK6hvCYfTW7yY64ZfA=", + "lastModified": 1791642191, + "narHash": "sha256-0bK0A59rVUn1SRZzo4cNi4VSqAe7vR1gL2/MZl53Frw=", "owner": "nix-community", "repo": "home-manager", - "rev": "0b2f1129177f70c5f0f5d88bb53c49ca47d0bfc0", + "rev": "c58f54c733a7894d84fa2fdff26cc12088c4b78c", "type": "github" }, "original": { @@ -129,11 +150,11 @@ ] }, "locked": { - "lastModified": 1790165840, - "narHash": "sha256-nQ3uCXiUGTLD/UtuChc2XlStYg9a33PYrkDitmmqxW8=", + "lastModified": 1791832860, + "narHash": "sha256-gr8ZDx9sYmCnXwCbDD41PWham17imNcPz5tOn668+yE=", "owner": "luynrs", "repo": "justray", - "rev": "4073f3fb223613e4d780dafad6f93b5c266061a2", + "rev": "1b28d332c1f7b0dfa2a16862f35cf5ef543a7e4f", "type": "github" }, "original": { @@ -197,11 +218,11 @@ ] }, "locked": { - "lastModified": 1790137578, - "narHash": "sha256-luzO2Bo/RxUHqTPxBttSB1QVzM9Y5s+Iwpip6SjWdWo=", + "lastModified": 1791783302, + "narHash": "sha256-j5WmuqsIfS6MYIr/gOXfqWCt6Clgd6SzFWF2COX+Us0=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "2e6a1d1ceb4da6b6ffb3980bc7993b3d057cd4db", + "rev": "bb2b26441fb371c8929adcc52c98267f2df5c201", "type": "github" }, "original": { @@ -240,11 +261,11 @@ }, "nix-systems": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1791244623, + "narHash": "sha256-uuanbkFk8a313Zfrxdcz8Us/yQtaxNnKJtX8v0ZPpd8=", "owner": "nix-systems", "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "rev": "d36eeed142f88b5a636f2e3856a53c61654cf29b", "type": "github" }, "original": { @@ -260,11 +281,11 @@ ] }, "locked": { - "lastModified": 1789978172, - "narHash": "sha256-FIRXajv1pPZ+l6On6ekkmcQ6le0Zi0ncRUoR3nB0vKA=", + "lastModified": 1791721963, + "narHash": "sha256-BYhx89XJltnRyQeuDKHVL5eSqbbfAcOKuDts7QRsrxQ=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "9ebcb7766700d7e006d9505247bd7ce0426f4232", + "rev": "60a624466c08787ee8303393b7d4752d1826f14f", "type": "github" }, "original": { @@ -300,11 +321,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1790046670, - "narHash": "sha256-MYiI+CzL0tuWgRPjGsKCDHqYs2T3OzMlMQWOYWG0qso=", + "lastModified": 1791734076, + "narHash": "sha256-i5qk1kLiit98rRbh1AXmWBNT9QXC/y4l5Wk/u5EdpDQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6774f7bc253789b113a4f39285dc0fa100abeacc", + "rev": "7fd4004d0511991fff3a0524856a9be09e28c5f0", "type": "github" }, "original": { @@ -348,11 +369,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1788057806, - "narHash": "sha256-DTQSMxzDWmT0zhguthvegnVkn7CFqGCv4IHCzk5ZUpM=", + "lastModified": 1790477367, + "narHash": "sha256-oujbxmVKDhci2E4EM3KyAbRUgp5/IsCoiA/LfEF7OOk=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "596e2e3940e09b2abbeb03f75fa1828c57fcd72c", + "rev": "f7cd230690d9fc982d06129f9189b101fddcfa3b", "type": "github" }, "original": { @@ -361,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": [ @@ -424,6 +461,7 @@ }, "proxy-suite": { "inputs": { + "disko": "disko_2", "nfqws2-keenetic": "nfqws2-keenetic", "nixpkgs": [ "nixpkgs" @@ -432,11 +470,11 @@ "zapret": "zapret" }, "locked": { - "lastModified": 1790130850, - "narHash": "sha256-k7c+KGZmNLP0ZB9jnKKJUXUTvEJC8A6kHQmZlcN8kNQ=", + "lastModified": 1791816503, + "narHash": "sha256-/JdG/uqisviWD0b1y6kZmVwXUXwBggzh4hU6AhmvdZA=", "owner": "FUFSoB", "repo": "proxy-suite-flake", - "rev": "8f65fa9c255e9350fb09f3d3cc9054034918bf49", + "rev": "2f8414455d2813b96ae1d4442a90ee8f58525300", "type": "github" }, "original": { @@ -460,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", @@ -489,11 +528,11 @@ ] }, "locked": { - "lastModified": 1789890976, - "narHash": "sha256-GKwH3zpy7tartuJMG0Rv/xUsdetG1QLmTVv8UKgJLmA=", + "lastModified": 1791710405, + "narHash": "sha256-mVD4XIc5JkqMW2K04IkFUzHgHmyJZlzw5ktfgMDCbKU=", "owner": "Mic92", "repo": "sops-nix", - "rev": "7214124c20c1542c90deb54af50e2f53ae02711f", + "rev": "ee48786c6f9160d2c1a084aac841f68195b8420c", "type": "github" }, "original": { @@ -548,11 +587,11 @@ "zapret-flowseal": "zapret-flowseal" }, "locked": { - "lastModified": 1788726932, - "narHash": "sha256-MehJgJpN7BGMaDES9I0aj/YG6JkRlSj5RiZDZfclNpc=", + "lastModified": 1790422884, + "narHash": "sha256-va22R1zFF7JmibmFwezLYfRup8PfVO3pV7toQH+cbL0=", "owner": "kartavkun", "repo": "zapret-discord-youtube", - "rev": "64a8ee76f4f2e4a8d2751cb732f13448ee1e4fcf", + "rev": "b82f45c363506588afbb45fefe41fe4670ae1480", "type": "github" }, "original": { @@ -564,11 +603,11 @@ "zapret-flowseal": { "flake": false, "locked": { - "lastModified": 1788121958, - "narHash": "sha256-WMpxbtA2OH340e4uuXR0tcUW0D6V9Kzs0KI1iKqkXBM=", + "lastModified": 1790845315, + "narHash": "sha256-zhyCW0LFkWkByHu2Vfgita8Bh3lIexUemGyz9elekUQ=", "owner": "Flowseal", "repo": "zapret-discord-youtube", - "rev": "6cec828910d0809863205702182a3557d9d0e8c3", + "rev": "eb16c1419057e36b8a36fbe7c959483450e6ac8b", "type": "github" }, "original": { 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 = {