aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-11-21 12:44:14 -0800
committerFranck Cuny <franck@fcuny.net>2025-11-21 12:44:14 -0800
commit24d00bf980e8f99c9056a6f1e9cb6354173bfd7e (patch)
treea2ecbfc804dcbaf6332571f42bcb82a68529ba9d
parentmove acme configurations to a profile (diff)
downloadinfra-24d00bf980e8f99c9056a6f1e9cb6354173bfd7e.tar.gz
add new host: argonath
-rw-r--r--README.md11
-rw-r--r--machines/nixos/x86_64-linux/argonath.nix26
-rw-r--r--profiles/hardware/do-droplet.nix6
3 files changed, 38 insertions, 5 deletions
diff --git a/README.md b/README.md
index 08c66f8..7398ad6 100644
--- a/README.md
+++ b/README.md
@@ -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