make ssh keys referenced
This commit is contained in:
parent
a5d5f9f74e
commit
4afe36edd2
4 changed files with 15 additions and 9 deletions
|
@ -36,6 +36,7 @@
|
|||
programs.git.enable = true;
|
||||
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
users.users.root.openssh.authorizedKeys.keys = import ./users/noe-keys.nix;
|
||||
|
||||
services.openssh.enable = lib.mkDefault true;
|
||||
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ pkgs, config, modulesPath, ... }: {
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
../../nixos/base.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = import ../users/noe-keys;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bashInteractive
|
||||
];
|
||||
|
|
7
nixos/users/noe-keys.nix
Normal file
7
nixos/users/noe-keys.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
default =
|
||||
[
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHrjnDY3hlN3cOCMBpcoh4GWdnG5nc9ZeOXJ7MtJVL3I''
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBs6/s+973H28jOrvN0zr1eayT+thrs61l1qV7uFhw8I''
|
||||
];
|
||||
}
|
|
@ -1,17 +1,12 @@
|
|||
{ config, pkgs, ... }: {
|
||||
users.users.noe = {
|
||||
hashedPasswordFile = config.sops.secrets."users/noe/password".path;
|
||||
#hashedPasswordFile = config.sops.secrets."users/noe/password".path;
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
shell = pkgs.fish;
|
||||
openssh.authorizedKeys.keys = [
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHrjnDY3hlN3cOCMBpcoh4GWdnG5nc9ZeOXJ7MtJVL3I''
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBs6/s+973H28jOrvN0zr1eayT+thrs61l1qV7uFhw8I''
|
||||
];
|
||||
openssh.authorizedKeys.keys = import ./noe-keys.nix;
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = config.users.users.noe.openssh.authorizedKeys.keys;
|
||||
|
||||
environment.systemPackages = [ pkgs.nixos-rebuild ];
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
|
@ -26,5 +21,5 @@
|
|||
}
|
||||
];
|
||||
|
||||
sops.secrets."users/noe/password".neededForUsers = true;
|
||||
#sops.secrets."users/noe/password".neededForUsers = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue