diff options
| author | Franck Cuny <franck@fcuny.net> | 2025-11-21 12:44:14 -0800 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2025-11-21 12:44:14 -0800 |
| commit | 24d00bf980e8f99c9056a6f1e9cb6354173bfd7e (patch) | |
| tree | a2ecbfc804dcbaf6332571f42bcb82a68529ba9d | |
| parent | move acme configurations to a profile (diff) | |
| download | infra-24d00bf980e8f99c9056a6f1e9cb6354173bfd7e.tar.gz | |
add new host: argonath
| -rw-r--r-- | README.md | 11 | ||||
| -rw-r--r-- | machines/nixos/x86_64-linux/argonath.nix | 26 | ||||
| -rw-r--r-- | profiles/hardware/do-droplet.nix | 6 |
3 files changed, 38 insertions, 5 deletions
@@ -27,3 +27,14 @@ nix run nix-darwin -- switch --flake . Finally, switch the default shell via `chsh`, and set it to `/run/current-system/sw/bin/fish`. Best to reboot to complete the installation. + +## Steps for a new droplet on DigitalOcean + +Start by creating a droplet using Debian. Create a new host configuration. + +Once the droplet is provisioned, we can use `nixos-anywhere` to convert the droplet to a NixOS installation. +```sh +nix run github:nix-community/nixos-anywhere -- --flake .#<host> --target-host root@<IP> +``` + +Once the host reboots, check that it's converted to NixOS by running `uname -a`. diff --git a/machines/nixos/x86_64-linux/argonath.nix b/machines/nixos/x86_64-linux/argonath.nix new file mode 100644 index 0000000..eb08896 --- /dev/null +++ b/machines/nixos/x86_64-linux/argonath.nix @@ -0,0 +1,26 @@ +{ lib, adminUser, ... }: +{ + imports = [ + ../../../profiles/cgroups.nix + ../../../profiles/defaults.nix + ../../../profiles/hardware/do-droplet.nix + ../../../profiles/disk/basic-vm.nix + ../../../profiles/home-manager.nix + ../../../profiles/server.nix + ]; + + # fixes duplicated devices in mirroredBoots + boot.loader.grub.devices = lib.mkForce [ "/dev/vda" ]; + + disko.devices.disk.disk1.device = "/dev/vda"; + + system.stateVersion = "25.05"; # Did you read the comment? + + home-manager = { + users.${adminUser.name} = { + imports = [ + ../../../home/profiles/minimal.nix + ]; + }; + }; +} diff --git a/profiles/hardware/do-droplet.nix b/profiles/hardware/do-droplet.nix index 0744181..aef5805 100644 --- a/profiles/hardware/do-droplet.nix +++ b/profiles/hardware/do-droplet.nix @@ -5,11 +5,7 @@ (modulesPath + "/virtualisation/digital-ocean-config.nix") ]; - boot.loader.grub = { - efiSupport = true; - efiInstallAsRemovable = true; - }; - + # do not use DHCP, as DigitalOcean provisions IPs using cloud-init networking.useDHCP = lib.mkForce false; # this one seems to always be broken |
