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:03:41 +00:00
|
|
|
hostname = config.cherrykitten.hostname;
|
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:47:29 +00:00
|
|
|
home-manager.users.sammy = lib.mkIf cfg.sammy.enable (import ../../users/sammy.nix);
|
|
|
|
# something with this is wrong lol // lib.mkIf (lib.pathExists (../../users + "/sammy@${hostname}.nix")) (import ../../users + "sammy@${hostname}.nix");
|
2024-03-24 18:02:28 +00:00
|
|
|
};
|
|
|
|
}
|