Files
nixos-config/hosts/m3-kratos/programs.nix
T
m3ta-chiron 765ae1581f fix(kratos): make Android Mosh app work with nushell login shell
The old Android Mosh app discovers mosh-server via POSIX shell idioms
(command -v / type) through the user's login shell. Nushell has no
command/type builtins and which prints a table, so the app reported
'mosh-server Not Found' on kratos (user shell: nu) while working on
hermes (app logs in as bash user).

Fix: use bash as login shell on kratos and exec into nushell for
interactive login sessions via programs.bash.interactiveShellInit.
Non-interactive SSH exec (app bootstrap, Termux mosh) stays in bash
where POSIX semantics work.

Also fixes the stale nh flake path (p/nixos -> p/NIX).
2026-08-23 14:24:43 +02:00

66 lines
1.8 KiB
Nix

{pkgs, ...}: {
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
# Add any missing dynamic libraries for unpackaged programs
# here, NOT in environment.systemPackages
];
programs.hyprland = {
enable = true;
xwayland.enable = true;
withUWSM = true;
};
programs.gamescope = {
enable = true;
capSysNice = true;
};
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
gamescopeSession.enable = true;
};
programs.localsend.enable = true;
programs.obs-studio = {
enable = true;
enableVirtualCamera = true;
plugins = with pkgs.obs-studio-plugins; [
obs-composite-blur
obs-vaapi
# obs-vertical-canvas
obs-vkcapture
wlrobs
];
};
programs.fish.enable = true;
# Login shell is bash (see configuration.nix), but interactive login
# sessions exec straight into nushell. Non-interactive SSH commands
# (e.g. the Android Mosh app bootstrap `command -v mosh-server`)
# stay in bash where POSIX shell semantics work.
programs.bash = {
enable = true;
interactiveShellInit = ''
if [[ $- == *i* ]] && shopt -q login_shell && [[ -z "''${M3_SHELL_TO_NU:-}" ]]; then
export M3_SHELL_TO_NU=1
exec ${pkgs.nushell}/bin/nu --login
fi
'';
};
programs.thunar = {
enable = true;
plugins = with pkgs; [thunar-archive-plugin thunar-volman];
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-gnome3;
settings = {default-cache-ttl = 10800;};
};
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/m3tam3re/p/NIX/nixos-config";
};
programs.mosh.enable = true;
}