From 7af1730fa3204ce724cdfc4db25aa22b6ac6e129 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 8 Nov 2022 01:37:28 +0300 Subject: [PATCH] fix: Import networking.nix when on Digital ocean --- nixos-infect | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/nixos-infect b/nixos-infect index a9d7ef6..233d731 100755 --- a/nixos-infect +++ b/nixos-infect @@ -27,6 +27,7 @@ makeConf() { && break done local network_import="" + [[ -n "$doNetConf" ]] && network_import="./networking.nix # generated at runtime by nixos-infect" cat > /etc/nixos/userdata/userdata.json << EOF { @@ -34,7 +35,8 @@ makeConf() { "token": "$API_TOKEN", "skippedMigrations": ["migrate_to_selfprivacy_channel", "mount_volume"] }, - "backblaze": { + "backup": { + "provider": "BACKBLAZE", "accountId": "$BACKBLAZE_KEY_ID", "accountKey": "$BACKBLAZE_ACCOUNT_KEY", "bucket": "$BACKBLAZE_BUCKET_NAME" @@ -43,9 +45,13 @@ makeConf() { "enable": true, "location": "sdb" }, - "cloudflare": { + "dns": { + "provider": "CLOUDFLARE", "apiKey": "$CF_TOKEN" }, + "server": { + "provider": "DIGITALOCEAN", + }, "databasePassword": "$DB_PASSWORD", "domain": "$DOMAIN", "hashedMasterPassword": "$HASHED_PASSWORD", @@ -106,7 +112,10 @@ EOF cat > /etc/nixos/hardware-configuration.nix << EOF { modulesPath, ... }: { - imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + $network_import + ]; $bootcfg boot.initrd.kernelModules = [ "nvme" ]; fileSystems."/" = { device = "$rootfsdev"; fsType = "$rootfstype"; };