From 892b5d16427f1ebcd015890cce56de912c1df805 Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Thu, 30 Jan 2025 12:03:56 -0500 Subject: [PATCH] nebula test run on do --- README.md | 18 ++++++++++++++++++ flake.nix | 19 ++++++++++++++----- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f4406f0..2b5f0db 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,21 @@ ## Deploying to the remote Note: If you need to specify the ssh key, you may inject extra cli options to the ssh command via the NIX_SSHOPTS environment variable * Anywhere from local: `nixos-rebuild switch --flake .# --target-host root@ --use-remote-sudo` + +## Vendor Specific Idiosyncrasies +### Digital Ocean + +Digital Ocean assigns IPs through cloud init so we need to not use DHCP + +``` +networking.useDHCP = nixpkgs.lib.mkForce false; +services.cloud-init = { + enable = true; + network.enable = true; + + # not strictly needed, just for good measure + datasource_list = [ "DigitalOcean" ]; + datasource.DigitalOcean = { };sops.defaultSopsFile = inputs.nix-secrets.secrets.lighthouse1; +}; +``` + diff --git a/flake.nix b/flake.nix index e42d573..22572e3 100644 --- a/flake.nix +++ b/flake.nix @@ -102,9 +102,9 @@ sops-nix.nixosModules.sops ]; }; - ########################## - # AWS Nebula Lighthouse1 # - ########################## + ######################### + # DO Nebula Lighthouse1 # + ######################### WCE-Lighthouse1 = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; @@ -115,10 +115,19 @@ }; modules = [ ./hosts/WCE-Lighthouse - "${nixpkgs}/nixos/modules/virtualisation/amazon-image.nix" { networking.hostName = "WCE-Lighthouse1"; - sops.defaultSopsFile = inputs.nix-secrets.secrets.lighthouse1; + networking.useDHCP = nixpkgs.lib.mkForce false; + + services.cloud-init = { + enable = true; + network.enable = true; + + # not strictly needed, just for good measure + datasource_list = ["DigitalOcean"]; + datasource.DigitalOcean = {}; + sops.defaultSopsFile = inputs.nix-secrets.secrets.lighthouse1; + }; } home-manager.nixosModules.home-manager sops-nix.nixosModules.sops