shell: use config.programs.fish.package over pkgs.fish

also sets the defaultUserShell independantly of allowAddingPackages,
since if programs.fish is already enabled it wouldn't be adding anything
This commit is contained in:
electria 2026-09-08 18:57:46 -07:00
commit 3af37fd7f5
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -47,7 +47,7 @@ in
config = lib.mkIf cfg.enable {
# use Fish, the nicest shell :)
programs.fish.enable = lib.mkIf config.nixowos.allowAddingPackages true;
users.defaultUserShell = lib.mkIf config.nixowos.allowAddingPackages pkgs.fish;
users.defaultUserShell = lib.mkIf config.programs.fish.enable config.programs.fish.package;
environment.shellAliases = {
# make nix-shell preserve the user's $SHELL