Unverified Commit a119bfc8 authored by Ryan Lahfa's avatar Ryan Lahfa Committed by GitHub
Browse files

Merge pull request #211603 from farcaller/fish

Assert that fish configuration is enabled if any user has fish as their shell
parents 2d6067ea 631b7f6f
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -699,7 +699,20 @@ in {
              users.groups.${user.name} = {};
            '';
          }
        ]
        ] ++ (map (shell: {
            assertion = (user.shell == pkgs.${shell}) -> (config.programs.${shell}.enable == true);
            message = ''
              users.users.${user.name}.shell is set to ${shell}, but
              programs.${shell}.enable is not true. This will cause the ${shell}
              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.${shell}.enable = true;
            '';
          }) [
          "fish"
          "xonsh"
          "zsh"
        ])
    ));

    warnings =