chore(ssh): Update keys

This commit is contained in:
Tibo De Peuter 2025-10-18 18:59:17 +02:00
parent 652a9da077
commit 6deb36d920
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
4 changed files with 28 additions and 13 deletions

View file

@ -3,24 +3,30 @@
let
cfg = config.homelab.users.admin;
in {
options.homelab.users.admin.enable = lib.mkEnableOption "user System Administrator";
options.homelab.users.admin = {
enable = lib.mkEnableOption "user System Administrator";
authorizedKeys = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [
# HomeLab > NixOS > admin > ssh
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGWIOOEqTy8cWKpENVbzD4p7bsQgQb/Dgpzk8i0dZ00T"
];
};
};
config = lib.mkIf cfg.enable {
nix.settings.trusted-users = [
config.users.users.admin.name
config.users.users.gh0st.name
];
users.users.admin = {
users.users.gh0st = {
description = "System Administrator";
isNormalUser = true;
extraGroups = [
config.users.groups.wheel.name # Enable 'sudo' for the user.
];
initialPassword = "ChangeMe";
openssh.authorizedKeys.keys = [
# HomeLab > NixOS > admin > ssh
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGWIOOEqTy8cWKpENVbzD4p7bsQgQb/Dgpzk8i0dZ00T"
];
openssh.authorizedKeys.keys = cfg.authorizedKeys;
packages = with pkgs; [
curl
git