base/base.nix: allow setting of ssh keys using an option
This commit is contained in:
@@ -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 = {
|
||||
|
Reference in New Issue
Block a user