-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
bugtriageIssues or feature request that have not been triaged yetIssues or feature request that have not been triaged yet
Description
Are you following the right branch?
- My Nixpkgs and Home Manager versions are in sync
Is there an existing issue for this?
- I have searched the existing issues
Issue description
- Enabling programs.bash on non-NixOS (genericLinux) causes incorrect reordering and duplication of PATH and XDG_DATA_DIRS.
- The module moves Nix paths ahead of system/Flatpak paths, which breaks certain Flatpak handlers/desktop entries.
- Even when the user explicitly defines these variables (via let … in and home.sessionVariables/home.sessionPath), the reordering and duplicates still appear after enabling programs.bash.
envs.before_bash_enable.txt
envs.with_bash_enable.txt
Minimal repro
home.nix:
{ config, pkgs, lib, ... }:
{
home.username = "deck";
home.homeDirectory = "/home/deck";
home.stateVersion = "25.05";
targets.genericLinux.enable = true;
xdg.enable = true;
programs.bash.enable = true;
programs.home-manager.enable = true;
}
Steps:
- home-manager switch --flake .#deck -b hm-bak
- exec bash -l
- Inspect:
echo $XDG_DATA_DIRS
echo $PATH
Actual
- XDG_DATA_DIRS: Nix paths end up before system/Flatpak, and duplicates appear.
- PATH: multiple instances of ~/.nix-profile/bin and duplicated system paths — despite explicit user ordering.
- Result: some Flatpaks fail to resolve system handlers/desktop entries correctly.
Expected
Enabling programs.bash should not reorder PATH/XDG_DATA_DIRS (expected order: Flatpak → system → Nix) and should not introduce duplicates, especially when the user has explicitly set these variables.
Maintainer CC
System information
- system: `"x86_64-linux"`
- host os: `Linux 6.11.11-valve24-2-neptune-611-gfd0dd251480d, SteamOS, noversion, 20250903.1`
- multi-user?: `no`
- sandbox: `yes`
- version: `nix-env (Determinate Nix 3.11.3) 2.31.2`
- nixpkgs: `not found`Metadata
Metadata
Assignees
Labels
bugtriageIssues or feature request that have not been triaged yetIssues or feature request that have not been triaged yet