Files
illogical-impulse/sdata/dist-nix
2025-11-05 07:55:22 +08:00
..
2025-11-05 07:55:22 +08:00
2025-11-04 15:30:54 +08:00
2025-11-04 20:54:14 +08:00

Install scripts using Nix to achieve cross-distros

NOTE: The sdata/dist-nix is not for NixOS but every distro, using Nix and home-manager.

plan

Note that this script must be idempotent.

TODO:

  • Fix all TODOs inside dist-nix.
  • Warn user if inode-limited filesystem (typically ext4) is used.
  • Deal with error when running systemctl --user enable ydotool --now:
    Failed to connect to user scope bus via local transport: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)
    

Attentions

PAM

On non-NixOS distros, programs using PAM (typically screen locker) will not work if installed via Nix, so user has to use their own distro's package for the screen lock.

  • One problem is that Debian(-based) distros use modified version of PAM which supports @include directive in /etc/pam.d config files but the PAM from Nix does not support it, see this comment.
  • Another problem is the location of a suid helper binary that is necessary, see this comment.

The problem could be solved by using the system-provided libpam instead.

See also https://github.com/caelestia-dots/shell/issues/668

NixGL

On non-NixOS distros, packages installed via home-manager have problem accessing GPU, especially Hyprland because it requires GPU acceleration to launch. nixGL should be used to address the problem.