diff options
| author | Franck Cuny <franck@fcuny.net> | 2025-08-12 13:05:22 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2025-08-12 13:05:22 -0700 |
| commit | 4450454e702ac18dfe0300fc03f6e6e2d70acd84 (patch) | |
| tree | 7f6d479b54bc1093a3b75d5d9a0736c99561217b /machines/nixos | |
| parent | remove unused variable (diff) | |
| download | infra-4450454e702ac18dfe0300fc03f6e6e2d70acd84.tar.gz | |
more simplifications
Diffstat (limited to '')
| -rw-r--r-- | machines/nixos/x86_64-linux/do-rproxy/default.nix | 54 | ||||
| -rw-r--r-- | machines/nixos/x86_64-linux/do-rproxy/digitalocean.nix | 55 |
2 files changed, 56 insertions, 53 deletions
diff --git a/machines/nixos/x86_64-linux/do-rproxy/default.nix b/machines/nixos/x86_64-linux/do-rproxy/default.nix index a2e0728..eab4a07 100644 --- a/machines/nixos/x86_64-linux/do-rproxy/default.nix +++ b/machines/nixos/x86_64-linux/do-rproxy/default.nix @@ -12,6 +12,7 @@ (modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/virtualisation/digital-ocean-config.nix") ./disks.nix + ./digitalocean.nix ./secrets.nix { home-manager.users.${adminUser.name} = { @@ -50,59 +51,6 @@ efiInstallAsRemovable = true; }; - # this one seems to always be broken - systemd.services.growpart.enable = false; - - # in order to get networking setup we need to enable it in cloud-init - # Disables all modules that do not work with NixOS - # Based on https://github.com/nix-community/nixos-anywhere-examples/blob/7f945ff0ae676c0eb77360b892add91328dd1f17/digitalocean.nix - services.cloud-init = { - enable = true; - network.enable = true; - settings = { - datasource_list = [ - "ConfigDrive" - "Digitalocean" - ]; - datasource.ConfigDrive = { }; - datasource.Digitalocean = { }; - # Based on https://github.com/canonical/cloud-init/blob/main/config/cloud.cfg.tmpl - cloud_init_modules = [ - "seed_random" - "bootcmd" - "write_files" - "growpart" - "resizefs" - "set_hostname" - "update_hostname" - "set_password" - ]; - cloud_config_modules = [ - "ssh-import-id" - "keyboard" - "runcmd" - "disable_ec2_metadata" - ]; - cloud_final_modules = [ - "write_files_deferred" - "puppet" - "chef" - "ansible" - "mcollective" - "salt_minion" - "reset_rmc" - "scripts_per_once" - "scripts_per_boot" - "scripts_user" - "ssh_authkey_fingerprints" - "keys_to_console" - "install_hotplug" - "phone_home" - "final_message" - ]; - }; - }; - networking.wireguard = { enable = true; interfaces.wg0 = { diff --git a/machines/nixos/x86_64-linux/do-rproxy/digitalocean.nix b/machines/nixos/x86_64-linux/do-rproxy/digitalocean.nix new file mode 100644 index 0000000..574fe99 --- /dev/null +++ b/machines/nixos/x86_64-linux/do-rproxy/digitalocean.nix @@ -0,0 +1,55 @@ +{ ... }: +{ + # this one seems to always be broken + systemd.services.growpart.enable = false; + + # in order to get networking setup we need to enable it in cloud-init + # Disables all modules that do not work with NixOS + # Based on https://github.com/nix-community/nixos-anywhere-examples/blob/7f945ff0ae676c0eb77360b892add91328dd1f17/digitalocean.nix + services.cloud-init = { + enable = true; + network.enable = true; + settings = { + datasource_list = [ + "ConfigDrive" + "Digitalocean" + ]; + datasource.ConfigDrive = { }; + datasource.Digitalocean = { }; + # Based on https://github.com/canonical/cloud-init/blob/main/config/cloud.cfg.tmpl + cloud_init_modules = [ + "seed_random" + "bootcmd" + "write_files" + "growpart" + "resizefs" + "set_hostname" + "update_hostname" + "set_password" + ]; + cloud_config_modules = [ + "ssh-import-id" + "keyboard" + "runcmd" + "disable_ec2_metadata" + ]; + cloud_final_modules = [ + "write_files_deferred" + "puppet" + "chef" + "ansible" + "mcollective" + "salt_minion" + "reset_rmc" + "scripts_per_once" + "scripts_per_boot" + "scripts_user" + "ssh_authkey_fingerprints" + "keys_to_console" + "install_hotplug" + "phone_home" + "final_message" + ]; + }; + }; +} |
