1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-27 10:07:44 +00:00
ncc/modules/linux/shell/default.nix
2025-07-26 01:12:24 +03:00

20 lines
629 B
Nix

{ config, lib, pkgs, ... }: let
inherit (lib) concatStringsSep const flatten getAttr mapAttrsToList mkForce unique;
in {
users.defaultUserShell = pkgs.crash;
# TODO: This should be a per-user session variable. But we can't set
# a home-manager session variable because that's initialized by the
# shell itself! Lol.
environment.sessionVariables.SHELLS = config.home-manager.users
|> mapAttrsToList (const <| getAttr "shellsByPriority")
|> flatten
|> map (drv: "${drv}${drv.shellPath}")
|> unique
|> concatStringsSep ":";
environment.shellAliases = {
ls = mkForce null;
l = mkForce null;
};
}