dotfiles/modules/nixos/users.nix
2026-02-10 00:38:50 +01:00

58 lines
1.1 KiB
Nix

{
inputs,
pkgs,
hostname,
...
}: {
imports = [
inputs.home-manager.nixosModules.home-manager
];
config = {
bosun.secrets.tophPassword = "toph-password.age";
programs.fish.enable = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "hm-bak";
users.toph.imports = [
(inputs.self + "/modules/home")
(inputs.self + "/home/by-host/${hostname}")
];
extraSpecialArgs = {
inherit inputs hostname;
};
};
users = {
users.toph = {
isNormalUser = true;
uid = 1000;
initialPassword = "wheel";
# hashedPasswordFile = config.age.secrets.tophPassword.path;
shell = pkgs.fish;
extraGroups = [
"wheel"
"docker"
"dialout"
"uinput"
"pico"
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBEqcR3f71g7yuxQtUewrqdoEh8jDHtkB1973GF0EQ6q christopher@all"
];
};
groups.toph = {
members = ["toph"];
gid = 1000;
};
};
};
}