base/base.nix: allow setting of ssh keys using an option

This commit is contained in:
2025-07-07 23:12:45 -07:00
parent 311a1c0c21
commit a265777138

View File

@@ -1,11 +1,20 @@
# Module: base/base
{ config, lib, pkgs, ... }:
with lib;
let
userSSHKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILiUy2yjIkdryH7pYMdkCNryy9gceqXJ7bhtMvvpPBIk etorres@xenon"
];
cfg = config.base;
in {
options.base = {
userSSHKeys = mkOption {
type = types.listOf types.str;
default = [];
description = "List of SSH keys to grant to the primary user";
example = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILiUy2yjIkdryH7pYMdkCNryy9gceqXJ7bhtMvvpPBIk etorres@xenon";
};
};
imports = [ ./grafana-alloy.nix ./network.nix ./qemu.nix ./spice.nix ];
time.timeZone = "Etc/UTC";
@@ -54,7 +63,7 @@ in {
shell = pkgs.zsh;
openssh.authorizedKeys.keys = userSSHKeys;
openssh.authorizedKeys.keys = cfg.userSSHKeys;
};
programs.neovim = {