From e800fdea4eb38d6aabb75c957c2c360f8c422329 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Thu, 10 Jul 2025 09:42:22 -0700 Subject: [PATCH] Initial stab at a custom image May not work, haven't tested it, need to switch systems --- README.md | 13 +++++++++++++ digitalocean/custom-image.nix | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 README.md create mode 100644 digitalocean/custom-image.nix diff --git a/README.md b/README.md new file mode 100644 index 0000000..ae58932 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# nixos-systems + +These are the system definitions for various systems being run by Gleipnir Technology. + +## From Zero + +Hat tip to [the negation](https://thenegation.com/posts/nixos-do-colmena/) for some ideas here. + +Build a custom image for Digital Ocean: + +``` +nix-build digitalocean/custom-image.nix +``` diff --git a/digitalocean/custom-image.nix b/digitalocean/custom-image.nix new file mode 100644 index 0000000..a335093 --- /dev/null +++ b/digitalocean/custom-image.nix @@ -0,0 +1,18 @@ +let + ## Pin the latest NixOS stable (nixos-25.05) release: + nixpkgs = builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/25.05.tar.gz"; + sha256 = "sha256:0q96nxw7jg9l9zlpa3wkma5xzmgkdnnajapwhgb2fk2ll224rgs1"; + }; + + ## Import nixpkgs: + pkgs = import nixpkgs { }; + + ## Prepare the NixOS configuration: + config = { + imports = [ + "${nixpkgs}/nixos/modules/virtualisation/digital-ocean-image.nix" + ]; + }; +in +(pkgs.nixos config).digitalOceanImage