modules/community-builder: allow users to set a shell

This commit is contained in:
zowoq 2024-09-26 12:23:43 +10:00
parent f550d11b48
commit f6a8e5703b
5 changed files with 14 additions and 6 deletions
modules
darwin/community-builder
nixos/community-builder
shared

View file

@ -13,6 +13,14 @@
environment.etc.motd.text = config.nixCommunity.motd;
programs.bash.enable = true;
environment.shells = [
pkgs.bashInteractive
pkgs.fish
pkgs.zsh
];
environment.systemPackages = [
pkgs.vim
];

View file

@ -1,3 +1,4 @@
{ pkgs, ... }:
let
# To add yourself:
# 1. Add an entry to this list, using the next UID.
@ -329,7 +330,7 @@ in
inherit (u) uid;
home = "/Users/${u.name}";
createHome = true;
shell = "/bin/zsh";
shell = u.shell or "/bin/zsh";
openssh.authorizedKeys.keyFiles = [ u.keys ];
};
}) users

View file

@ -26,10 +26,6 @@
withUtempter = false;
};
programs.fish.enable = true;
# disable generated completion
environment.etc."fish/generated_completions".text = pkgs.lib.mkForce "";
systemd.services.nixpkgs-clone = {
serviceConfig.Type = "oneshot";
startAt = "daily";

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
let
inherit (pkgs) lib;
@ -190,6 +190,7 @@ let
extraGroups = userGroups opts;
createHome = true;
home = "/home/${name}";
shell = opts.shell or config.users.defaultUserShell;
hashedPassword = opts.password or null;
openssh.authorizedKeys.keyFiles = [ opts.keys ];
};

View file

@ -30,6 +30,8 @@
programs.nix-index-database.comma.enable = true;
programs.fish.enable = true;
programs.zsh = {
enable = true;
# https://grml.org/zsh/grmlzshrc.html