aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-22 10:41:23 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-22 10:41:23 +0100
commita97634f5062088f8d4e6d3c06fdf82a87c157167 (patch)
tree0beb87b755281da3d25caa1a8def0a5a2348c755
parent844ef0c37a6f10a1c912707c35dd843c44ea92ba (diff)
downloaddotfiles-a97634f5062088f8d4e6d3c06fdf82a87c157167.tar.gz
dotfiles-a97634f5062088f8d4e6d3c06fdf82a87c157167.tar.bz2
dotfiles-a97634f5062088f8d4e6d3c06fdf82a87c157167.zip
fix(nix,zsh): tuicr flake schema + restore XDG_DATA_DIRS
tuicr's upstream flake uses the legacy 'defaultPackage.<system>' output schema, not 'packages.<system>.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).
-rw-r--r--dot_config/zsh/dot_zprofile9
-rw-r--r--nix/flake.lock121
-rw-r--r--nix/flake.nix4
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.<system>`
+ # schema (not `packages.<system>.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,