Skip to content

users.knownUsers needs to bet set to change the default shell to fish in Darwin home-manager #175

@Anaxagoras-bc

Description

@Anaxagoras-bc

I was trying to declaratively set my shell to fish using nix-darwin and I discovered that I had to set the following to get it to work. Unsure if this has an impact on anything else as this is my first day trying nix package manager. But it took me a while to figure out and I thought others might benefit from this.

nixos-config/modules/darwin/home-manager.nix

  # It me
+  users.knownUsers = [ "${user}" ];
  users.users.${user} = {
    name = "${user}";
+    uid = 501;
    home = "/Users/${user}";
    isHidden = false;
    #shell = pkgs.zsh;
    shell = pkgs.fish;
  };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions