diff --git a/targets/nixos-wiki.thalheim.io/configuration.nix b/targets/nixos-wiki.thalheim.io/configuration.nix index 9d57beb..5657f2a 100644 --- a/targets/nixos-wiki.thalheim.io/configuration.nix +++ b/targets/nixos-wiki.thalheim.io/configuration.nix @@ -1,6 +1,9 @@ -{ self, ... }: { +{ self, ... }: let + nixosVars = builtins.fromJSON (builtins.readFile ./nixos-vars.json); +in { imports = [ self.nixosModules.nixos-wiki self.nixosModules.hcloud ]; + config.users.users.root.openssh.authorizedKeys.keys = nixosVars.ssh_keys; } diff --git a/targets/staging.nixos-wiki.thalheim.io/configuration.nix b/targets/staging.nixos-wiki.thalheim.io/configuration.nix index 9d57beb..5657f2a 100644 --- a/targets/staging.nixos-wiki.thalheim.io/configuration.nix +++ b/targets/staging.nixos-wiki.thalheim.io/configuration.nix @@ -1,6 +1,9 @@ -{ self, ... }: { +{ self, ... }: let + nixosVars = builtins.fromJSON (builtins.readFile ./nixos-vars.json); +in { imports = [ self.nixosModules.nixos-wiki self.nixosModules.hcloud ]; + config.users.users.root.openssh.authorizedKeys.keys = nixosVars.ssh_keys; } diff --git a/terraform/nixos-wiki/main.tf b/terraform/nixos-wiki/main.tf index a58daba..d0def33 100644 --- a/terraform/nixos-wiki/main.tf +++ b/terraform/nixos-wiki/main.tf @@ -34,6 +34,6 @@ resource "hcloud_server" "nixos_wiki" { locals { nixos_vars = { ipv6_address = hcloud_server.nixos_wiki.ipv6_address - ssh_keys = data.hcloud_ssh_keys.nixos_wiki.ssh_keys.*.public_key + ssh_keys = data.hcloud_ssh_keys.nixos_wiki.ssh_keys.*.public_key } }