Revert "base/base.nix: remove ssh keys from base"
This reverts commit cab1a6c739
.
This commit is contained in:
169
base/base.nix
169
base/base.nix
@@ -5,91 +5,106 @@ with lib;
|
||||
|
||||
let 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";
|
||||
config = {
|
||||
time.timeZone = "Etc/UTC";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true;
|
||||
};
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true;
|
||||
};
|
||||
|
||||
environment.variables = { PAGER = "nvimpager"; };
|
||||
environment.variables = { PAGER = "nvimpager"; };
|
||||
|
||||
# Maintenance
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
# Maintenance
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
auto-optimise-store = true;
|
||||
cores = 2;
|
||||
max-jobs = 2;
|
||||
};
|
||||
nix.settings = {
|
||||
auto-optimise-store = true;
|
||||
cores = 2;
|
||||
max-jobs = 2;
|
||||
};
|
||||
|
||||
users.users.etorres = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
packages = with pkgs; [
|
||||
compose2nix
|
||||
curl
|
||||
fd
|
||||
fzf
|
||||
git
|
||||
neovim
|
||||
nixfmt-rfc-style
|
||||
nvimpager
|
||||
ripgrep
|
||||
safe-rm
|
||||
stow
|
||||
tmux
|
||||
tree
|
||||
wget
|
||||
zsh
|
||||
users.users.etorres = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
packages = with pkgs; [
|
||||
compose2nix
|
||||
curl
|
||||
fd
|
||||
fzf
|
||||
git
|
||||
neovim
|
||||
nixfmt-rfc-style
|
||||
nvimpager
|
||||
ripgrep
|
||||
safe-rm
|
||||
stow
|
||||
tmux
|
||||
tree
|
||||
wget
|
||||
zsh
|
||||
];
|
||||
|
||||
shell = pkgs.zsh;
|
||||
|
||||
openssh.authorizedKeys.keys = cfg.userSSHKeys;
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
};
|
||||
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Defaults env_keep += "EDITOR"
|
||||
Defaults pwfeedback
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
borgbackup
|
||||
borgmatic
|
||||
grafana-alloy
|
||||
python3 # For Ansible
|
||||
];
|
||||
|
||||
shell = pkgs.zsh;
|
||||
# ========== Services ==========
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.PermitRootLogin = "no";
|
||||
};
|
||||
|
||||
openssh.authorizedKeys.keys = cfg.userSSHKeys;
|
||||
services.xserver.enable = false;
|
||||
|
||||
# /run/current-system/configuration.nix
|
||||
system.copySystemConfiguration = true;
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
};
|
||||
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Defaults env_keep += "EDITOR"
|
||||
Defaults pwfeedback
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
borgbackup
|
||||
borgmatic
|
||||
grafana-alloy
|
||||
python3 # For Ansible
|
||||
];
|
||||
|
||||
# ========== Services ==========
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.PermitRootLogin = "no";
|
||||
};
|
||||
|
||||
openssh.authorizedKeys.keys = cfg.userSSHKeys;
|
||||
services.xserver.enable = false;
|
||||
|
||||
# /run/current-system/configuration.nix
|
||||
system.copySystemConfiguration = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user