Commit 5906beca357e

Vincent Demeester <vincent@sbr.pm>
2026-02-13 13:42:37
fix(desktop): skipped usrbinenv activation when envfs mounted
The activation script failed on live switch because envfs mounts a read-only FUSE filesystem over /usr/bin. Added a check to skip when envfs is already active, since the script is only needed before envfs mounts during boot.
1 parent d733768
Changed files (2)
systems
common
okinawa
systems/common/desktop/default.nix
@@ -115,6 +115,10 @@
   # boot before envfs can mount. Create it via activation as a fallback.
   # See: https://github.com/NixOS/nixpkgs/issues/462556
   system.activationScripts.usrbinenv = lib.mkOverride 0 ''
+    # Skip if envfs FUSE is already mounted (read-only during live switch)
+    if findmnt -n -t fuse /usr/bin >/dev/null 2>&1; then
+      exit 0
+    fi
     mkdir -p /usr/bin
     chmod 0755 /usr/bin
     ln -sfn ${config.environment.usrbinenv} /usr/bin/env
systems/okinawa/home.nix
@@ -1,4 +1,11 @@
-{ pkgs, lib, config, inputs, system, ... }:
+{
+  pkgs,
+  lib,
+  config,
+  inputs,
+  system,
+  ...
+}:
 let
   # Wrapper for jira-cli that injects API token from passage
   jira-wrapped = pkgs.writeShellScriptBin "jira" ''