nix-infra/modules/nixos/users.nix

22 lines
644 B
Nix
Raw Normal View History

2024-03-24 18:02:45 +00:00
{ pkgs, config, lib, ... }:
2024-03-24 18:02:29 +00:00
let
2024-03-24 18:02:28 +00:00
cfg = config.cherrykitten.users;
2024-03-24 18:02:29 +00:00
in
{
2024-03-24 18:02:28 +00:00
options.cherrykitten.users = {
2024-03-24 18:02:29 +00:00
sammy.enable = lib.mkEnableOption "sammy" // { default = true; };
2024-03-24 18:02:28 +00:00
};
config = {
users.users.sammy = lib.mkIf cfg.sammy.enable {
isNormalUser = true;
2024-03-24 18:02:29 +00:00
extraGroups = [ "networkmanager" "wheel" "docker" ];
2024-03-24 18:02:28 +00:00
shell = pkgs.fish;
ignoreShellProgramCheck = true;
2024-03-24 18:02:29 +00:00
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZyQSZw+pExsx2RXB+yxbaJGB9mtvudbQ/BP7E1yKvr openpgp:0x6068FEBB" ];
2024-03-24 18:02:28 +00:00
};
2024-03-24 18:03:25 +00:00
home-manager.users.sammy = lib.mkIf cfg.sammy.enable (import ../home/users/sammy.nix);
2024-03-24 18:02:28 +00:00
};
}