feat(users): add shell module, simplify users module

This commit is contained in:
Mohammad Rafiq 2025-07-07 09:15:36 +08:00
parent c56e3e5eba
commit f7d404494f
No known key found for this signature in database
2 changed files with 18 additions and 7 deletions

View file

@ -6,13 +6,11 @@ let
in
{
flake.modules.nixos.default =
{ pkgs, config, ... }:
{ config, ... }:
{
#TODO: move sudo/security options elsewhere
# security.sudo.wheelNeedsPassword = false;
# nix.settings.trusted-users = [ "@wheel" ];
#TODO: move to shell config
# programs.${owner.shell}.enable = true;
#TODO: move ssh key settings elsewhere
# users.users.root.openssh.authorizedKeys.keys = [ owner.pubkey ];
users = {
@ -22,14 +20,10 @@ in
_: value: {
isNormalUser = true;
extraGroups = optional (value.primary or false) "wheel";
# FIXME: remove when we make the shell module
ignoreShellProgramCheck = true;
shell = pkgs.${value.shell};
openssh.authorizedKeys.keys = [ value.pubkey ];
}
);
};
home-manager.users = forAllUsers' (
name: _: {
home.username = name;