diff --git a/flake.nix b/flake.nix index f24407f..17533f9 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,7 @@ { lib = { gen-ssh-config = import lib/gen-ssh-config.nix lib; + ssh-keys = import lib/ssh-keys.nix; }; nixosModules = mods // { default.imports = builtins.attrValues mods; }; diff --git a/lib/ssh-keys.nix b/lib/ssh-keys.nix new file mode 100644 index 0000000..aac96ee --- /dev/null +++ b/lib/ssh-keys.nix @@ -0,0 +1,6 @@ +[ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIqWHzIXaF88Y8+64gBlLbZ5ZZcLl08kTHG1clHd7gaq desktop" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJlMPWSVyDNAvXYtpXCI/geCeUEMbL9Nthm9B0zg1sIy sean@hp" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDuuBHq3x28cdQ0JWAZ0R+2rVlRoPnA+MOvpdF5rraGp sean@lenny" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE59uvHtxmdjqMaKyPiKLdiwfu0i59iFczrbGY0t6Oed sean@levi" +] diff --git a/modules/sean.nix b/modules/sean.nix index 01bb5c3..424bf0b 100644 --- a/modules/sean.nix +++ b/modules/sean.nix @@ -1,12 +1,4 @@ { config, lib, pkgs, ... }: -let - keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIqWHzIXaF88Y8+64gBlLbZ5ZZcLl08kTHG1clHd7gaq desktop" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJlMPWSVyDNAvXYtpXCI/geCeUEMbL9Nthm9B0zg1sIy sean@hp" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDuuBHq3x28cdQ0JWAZ0R+2rVlRoPnA+MOvpdF5rraGp sean@lenny" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE59uvHtxmdjqMaKyPiKLdiwfu0i59iFczrbGY0t6Oed sean@levi" - ]; -in { users.users.sean = { uid = 2000; @@ -20,7 +12,7 @@ in "wheel" "wireshark" ]; - openssh.authorizedKeys = { inherit keys; }; + openssh.authorizedKeys.keys = import ../lib/ssh-keys.nix; }; systemd.tmpfiles.rules = [ "e /home/sean/Downloads - - - 9d" ];