From 5c8c7c627c3f186b1acae2d84ceae9b5e2e6dc0b Mon Sep 17 00:00:00 2001 From: MithicSpirit Date: Sun, 11 Jan 2026 17:37:57 -0500 Subject: [PATCH] nix: update nixpkgs, remove zig.hook, and remove x11-gnome As of NixOS/nixpkgs#473413[1], `zig.hook` no longer supports `zig_default_flags`, and now they can and must be provided in `zigBuildFlags` instead. Updating also requires removing gnome-xorg since it has been removed from nixpkgs. [1] https://github.com/NixOS/nixpkgs/pull/473413 --- flake.lock | 15 +++++++-------- flake.nix | 3 +-- nix/package.nix | 16 +++++----------- nix/tests.nix | 2 +- nix/vm/common-gnome.nix | 2 +- nix/vm/x11-gnome.nix | 9 --------- 6 files changed, 15 insertions(+), 32 deletions(-) delete mode 100644 nix/vm/x11-gnome.nix diff --git a/flake.lock b/flake.lock index a80c2f8ae..853fb27b6 100644 --- a/flake.lock +++ b/flake.lock @@ -41,27 +41,26 @@ ] }, "locked": { - "lastModified": 1755776884, - "narHash": "sha256-CPM7zm6csUx7vSfKvzMDIjepEJv1u/usmaT7zydzbuI=", + "lastModified": 1768068402, + "narHash": "sha256-bAXnnJZKJiF7Xr6eNW6+PhBf1lg2P1aFUO9+xgWkXfA=", "owner": "nix-community", "repo": "home-manager", - "rev": "4fb695d10890e9fc6a19deadf85ff79ffb78da86", + "rev": "8bc5473b6bc2b6e1529a9c4040411e1199c43b4c", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-25.05", "repo": "home-manager", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1763191728, - "narHash": "sha256-gI9PpaoX4/f28HkjcTbFVpFhtOxSDtOEdFaHZrdETe0=", - "rev": "1d4c88323ac36805d09657d13a5273aea1b34f0c", + "lastModified": 1768032153, + "narHash": "sha256-zvxtwlM8ZlulmZKyYCQAPpkm5dngSEnnHjmjV7Teloc=", + "rev": "3146c6aa9995e7351a398e17470e15305e6e18ff", "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre896415.1d4c88323ac3/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre925418.3146c6aa9995/nixexprs.tar.xz" }, "original": { "type": "tarball", diff --git a/flake.nix b/flake.nix index d70f23513..58e250aec 100644 --- a/flake.nix +++ b/flake.nix @@ -35,7 +35,7 @@ }; home-manager = { - url = "github:nix-community/home-manager?ref=release-25.05"; + url = "github:nix-community/home-manager"; inputs = { nixpkgs.follows = "nixpkgs"; }; @@ -117,7 +117,6 @@ wayland-gnome = runVM ./nix/vm/wayland-gnome.nix; wayland-plasma6 = runVM ./nix/vm/wayland-plasma6.nix; x11-cinnamon = runVM ./nix/vm/x11-cinnamon.nix; - x11-gnome = runVM ./nix/vm/x11-gnome.nix; x11-plasma6 = runVM ./nix/vm/x11-plasma6.nix; x11-xfce = runVM ./nix/vm/x11-xfce.nix; }; diff --git a/nix/package.nix b/nix/package.nix index 3d00648ec..b2decc7bc 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -20,16 +20,6 @@ wayland-scanner, pkgs, }: let - # The Zig hook has no way to select the release type without actual - # overriding of the default flags. - # - # TODO: Once - # https://github.com/ziglang/zig/issues/14281#issuecomment-1624220653 is - # ultimately acted on and has made its way to a nixpkgs implementation, this - # can probably be removed in favor of that. - zig_hook = zig_0_15.hook.overrideAttrs { - zig_default_flags = "-Dcpu=baseline -Doptimize=${optimize} --color off"; - }; gi_typelib_path = import ./build-support/gi-typelib-path.nix { inherit pkgs lib stdenv; }; @@ -73,7 +63,7 @@ in ncurses pandoc pkg-config - zig_hook + zig_0_15 gobject-introspection wrapGAppsHook4 blueprint-compiler @@ -92,12 +82,16 @@ in GI_TYPELIB_PATH = gi_typelib_path; + dontSetZigDefaultFlags = true; + zigBuildFlags = [ "--system" "${finalAttrs.deps}" "-Dversion-string=${finalAttrs.version}-${revision}-nix" "-Dgtk-x11=${lib.boolToString enableX11}" "-Dgtk-wayland=${lib.boolToString enableWayland}" + "-Dcpu=baseline" + "-Doptimize=${optimize}" "-Dstrip=${lib.boolToString strip}" ]; diff --git a/nix/tests.nix b/nix/tests.nix index a9970e80c..3949877cf 100644 --- a/nix/tests.nix +++ b/nix/tests.nix @@ -274,7 +274,7 @@ in { client.succeed("${su "${ghostty} +new-window"}") client.wait_until_succeeds("${wm_class} | grep -q 'com.mitchellh.ghostty-debug'") - with subtest("SSH from client to server and verify that the Ghostty terminfo is copied.") + with subtest("SSH from client to server and verify that the Ghostty terminfo is copied."): client.sleep(2) client.send_chars("ssh ghostty@server\n") server.wait_for_file("${user.home}/.terminfo/x/xterm-ghostty", timeout=30) diff --git a/nix/vm/common-gnome.nix b/nix/vm/common-gnome.nix index ab4aab9e9..d8d484071 100644 --- a/nix/vm/common-gnome.nix +++ b/nix/vm/common-gnome.nix @@ -8,7 +8,7 @@ ./common.nix ]; - services.xserver = { + services = { displayManager = { gdm = { enable = true; diff --git a/nix/vm/x11-gnome.nix b/nix/vm/x11-gnome.nix deleted file mode 100644 index 1994aea82..000000000 --- a/nix/vm/x11-gnome.nix +++ /dev/null @@ -1,9 +0,0 @@ -{...}: { - imports = [ - ./common-gnome.nix - ]; - - services.displayManager = { - defaultSession = "gnome-xorg"; - }; -}