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