diff --git a/nixos/hosts/asxpio-services/xmpp-cert-install.nix b/nixos/hosts/asxpio-services/xmpp-cert-install.nix index 346aea0..908b45b 100644 --- a/nixos/hosts/asxpio-services/xmpp-cert-install.nix +++ b/nixos/hosts/asxpio-services/xmpp-cert-install.nix @@ -26,7 +26,16 @@ in description = "Public half of xmpp_cert_sync/ssh_key in the ops secrets."; }; - config.users.users.root.openssh.authorizedKeys.keys = [ - ''restrict,from="10.10.0.10",command="${lib.getExe install}" ${config.asxpio.xmppCertSyncKey} xmpp-cert-sync'' - ]; + options.asxpio.xmppCertSyncKeysExtra = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ + # Debian asxpio-ops's key (Ansible role xmpp_cert_sync), until ops + # runs NixOS too. Remove after the ops conversion. + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGLSz8AvKF/cHmMBGxn7+BqNHa/g79xmRrnb7779lXLo" + ]; + }; + + config.users.users.root.openssh.authorizedKeys.keys = map ( + key: ''restrict,from="10.10.0.10",command="${lib.getExe install}" ${key} xmpp-cert-sync'' + ) ([ config.asxpio.xmppCertSyncKey ] ++ config.asxpio.xmppCertSyncKeysExtra); } diff --git a/nixos/hosts/rehearsal/services.nix b/nixos/hosts/rehearsal/services.nix index 2ea3bdc..cd1617f 100644 --- a/nixos/hosts/rehearsal/services.nix +++ b/nixos/hosts/rehearsal/services.nix @@ -13,6 +13,7 @@ systemd.network.networks."10-public".address = lib.mkForce [ "2a01:4f9:c01d:6f9::1/64" ]; asxpio.publicIPv4 = "2.29.197.9"; + asxpio.xmppCertSyncKeysExtra = [ ]; asxpio.xmppCertSyncKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHXhvaO3Dhkw3QuMUHycoPU12Vx8bKWk2PCFoULvnTAf"; # A 4 GB server