From a97634f5062088f8d4e6d3c06fdf82a87c157167 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Fri, 22 May 2026 10:41:23 +0100 Subject: fix(nix,zsh): tuicr flake schema + restore XDG_DATA_DIRS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tuicr's upstream flake uses the legacy 'defaultPackage.' output schema, not 'packages..default' — fixes the home-manager switch error 'attribute packages missing' at nix/flake.nix:28. zsh: removing the system zsh package took /etc/zsh/zprofile with it, which used to 'source /etc/profile' and pull in /etc/profile.d/*.sh (flatpak.sh, nix.sh, etc.). Reconstruct XDG_DATA_DIRS in dot_zprofile defensively, including per-user + system flatpak exports + nix-profile share, so 'flatpak update' stops warning and desktop entries from flatpak/nix-installed apps work in launchers (fuzzel). --- dot_config/zsh/dot_zprofile | 9 ++++ nix/flake.lock | 121 +++++++++++++++++++++++++++++++++++++++++++- nix/flake.nix | 4 +- 3 files changed, 132 insertions(+), 2 deletions(-) diff --git a/dot_config/zsh/dot_zprofile b/dot_config/zsh/dot_zprofile index 66e97cd..b0f7089 100644 --- a/dot_config/zsh/dot_zprofile +++ b/dot_config/zsh/dot_zprofile @@ -20,6 +20,15 @@ export XDG_DATA_HOME="$HOME/.local/share" export XDG_STATE_HOME="$HOME/.local/state" export XDG_CACHE_HOME="$HOME/.cache" +# Pull in /etc/profile + /etc/profile.d/*.sh. The Arch zsh package used +# to ship /etc/zsh/zprofile doing exactly this, but we removed system +# zsh in favour of nix's zsh, so we replicate it here. This is how +# flatpak (XDG_DATA_DIRS for app launchers), nix-daemon, locale, etc. +# inject themselves into login shells. Sourced AFTER our PATH setup so +# `typeset -U path` keeps nix-profile/bin + ~/.local/bin at the front +# even if /etc/profile.d snippets try to prepend duplicates. +[[ -r /etc/profile ]] && emulate sh -c 'source /etc/profile' + # ── Locale ──────────────────────────────────────────────────────────────────── export LANG=en_US.UTF-8 diff --git a/nix/flake.lock b/nix/flake.lock index 7b633fb..4639d61 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -1,5 +1,28 @@ { "nodes": { + "fenix": { + "inputs": { + "nixpkgs": [ + "tuicr", + "naersk", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1752475459, + "narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=", + "owner": "nix-community", + "repo": "fenix", + "rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -21,6 +44,29 @@ "type": "github" } }, + "naersk": { + "inputs": { + "fenix": "fenix", + "nixpkgs": [ + "tuicr", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769799857, + "narHash": "sha256-88IFXZ7Sa1vxbz5pty0Io5qEaMQMMUPMonLa3Ls/ss4=", + "owner": "nix-community", + "repo": "naersk", + "rev": "9d4ed44d8b8cecdceb1d6fd76e74123d90ae6339", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "naersk", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1778869304, @@ -40,7 +86,80 @@ "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "tuicr": "tuicr" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1752428706, + "narHash": "sha256-EJcdxw3aXfP8Ex1Nm3s0awyH9egQvB2Gu+QEnJn2Sfg=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "591e3b7624be97e4443ea7b5542c191311aa141d", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tuicr": { + "inputs": { + "naersk": "naersk", + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1779404076, + "narHash": "sha256-WkPMecljTG/cEg2+AAgCk92ta8Gs2UhY32n2u6h7eU0=", + "owner": "agavra", + "repo": "tuicr", + "rev": "35ecbe2863d7a0a5321612bf6bb955006fab24c2", + "type": "github" + }, + "original": { + "owner": "agavra", + "repo": "tuicr", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" } } }, diff --git a/nix/flake.nix b/nix/flake.nix index 9e26edb..ca2ad66 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -25,7 +25,9 @@ overlays = [ # Expose `pkgs.tuicr` so common.nix can list it next to other # packages without threading inputs into every module. - (final: prev: { tuicr = tuicr.packages.${system}.default; }) + # tuicr's flake uses the legacy `defaultPackage.` + # schema (not `packages..default`); see its flake.nix. + (final: prev: { tuicr = tuicr.defaultPackage.${system}; }) ]; # Whitelist specific unfree packages (claude-code, # github-copilot-cli) instead of globally setting allowUnfree, -- cgit v1.3.1