nix/denna,sini: setup ssh keys
Anirudh Oppiliappan x@icyphox.sh
Sun, 07 Jul 2024 11:06:14 +0300
3 files changed,
27 insertions(+),
0 deletions(-)
M
hosts/denna/configuration.nix
→
hosts/denna/configuration.nix
@@ -4,6 +4,7 @@ {
imports = [ ./hardware-configuration.nix + ../ssh.nix ]; boot.loader.systemd-boot.enable = true;@@ -87,6 +88,17 @@ role = "agent";
extraFlags = "--node-ip=${address} --node-external-ip=${address}"; serverAddr = "https://sini:6443"; tokenFile = "/var/lib/rancher/k3s/token"; + }; + + environment.etc = { + "rancher/k3s/registries.yaml" = { + text = '' + mirrors: + sini:5000: + endpoint: + - "http://sini:5000" + ''; + }; }; nix.settings.experimental-features = [ "nix-command" "flakes" ];
M
hosts/sini/configuration.nix
→
hosts/sini/configuration.nix
@@ -4,6 +4,7 @@ {
imports = [ ./hardware-configuration.nix + ../ssh.nix ]; boot.loader.systemd-boot.enable = true;
A
hosts/ssh.nix
@@ -0,0 +1,14 @@
+{ config, lib, pkgs, modulesPath, ... }: + +let + keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICJPYX06+qKr9IHWfkgCtHbExoBOOwS/+iAWbog9bAdk icy@wyndle" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIlcByNC93n6dH41uxdLvbtf8XfKF0hoN35548PRga3M icy@kvothe" + ]; + +in + +{ + users.users.git.openssh.authorizedKeys.keys = keys; + users.users.icy.openssh.authorizedKeys.keys = keys; +}