mirror of
https://github.com/RGBCube/ncc
synced 2025-07-27 18:17:44 +00:00
shells: fix a lot of logic and use activation scripts
This commit is contained in:
parent
e759456954
commit
f673d73cd2
5 changed files with 165 additions and 132 deletions
|
@ -1,9 +1,15 @@
|
|||
{ config, lib, pkgs, ... }: let
|
||||
inherit (lib) concatStringsSep;
|
||||
inherit (lib) concatStringsSep const flatten getAttr mapAttrsToList unique;
|
||||
in {
|
||||
users.defaultUserShell = pkgs.crash;
|
||||
|
||||
environment.sessionVariables.SHELLS = config.shellsByPriority
|
||||
|> map (drv: "${drv}${drv.shellPath}")
|
||||
|> concatStringsSep ":";
|
||||
# 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 ":";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue