Skip to content

Commit

Permalink
Assert that fish configuration is enabled if any user has fish as the…
Browse files Browse the repository at this point in the history
…ir shell.

Suggested-By: matthiasbeyer
  • Loading branch information
farcaller committed Jan 19, 2023
1 parent 486c531 commit 59296fb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nixos/modules/config/users-groups.nix
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,16 @@ in {
users.groups.${user.name} = {};
'';
}
{
assertion = (user.shell == pkgs.fish) -> (config.programs.fish.enable == true);
message = ''
users.users.${user.name}.shell is set to fish, but
programs.fish.enable is not true. This will cause the fish shell
to lack the basic nix directories in its PATH and might make
logging in as that user impossible. You can fix it with:
programs.fish.enable = true;
'';
}
]
));

Expand Down

0 comments on commit 59296fb

Please sign in to comment.