From 2c6afa98bc448d2f1e6797857820c91fc89a1247 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Mon, 21 Oct 2024 14:57:59 -0700 Subject: [PATCH] WIP: Create installation ISO for pre-configured NixOS --- nix/digitalocean/image.nix | 6 ++++++ nix/digitalocean/shell.nix | 4 ++++ nix/flake.nix | 9 +++++++++ 3 files changed, 19 insertions(+) create mode 100644 nix/digitalocean/image.nix create mode 100644 nix/digitalocean/shell.nix diff --git a/nix/digitalocean/image.nix b/nix/digitalocean/image.nix new file mode 100644 index 00000000..6fa99796 --- /dev/null +++ b/nix/digitalocean/image.nix @@ -0,0 +1,6 @@ +{ pkgs ? import { } }: +let config = { + imports = [ ]; +}; +in +(pkgs.nixos config).digitalOceanImage \ No newline at end of file diff --git a/nix/digitalocean/shell.nix b/nix/digitalocean/shell.nix new file mode 100644 index 00000000..64cc68f4 --- /dev/null +++ b/nix/digitalocean/shell.nix @@ -0,0 +1,4 @@ +{ pkgs ? import { } }: +pkgs.mkShell { + buildInputs = with pkgs; [ curl morph ]; +} \ No newline at end of file diff --git a/nix/flake.nix b/nix/flake.nix index 2f1ac871..f3f7fcaa 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -52,6 +52,15 @@ in { nixosConfigurations = { + iso = lib.nixosSystem { + modules = [ + "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" + "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" + ./iso/server-configuration.nix + inputs.home-manager.nixosModules.home-manager + ]; + specialArgs = {inherit pkgs; }; + }; ${systemSettings.hostname} = lib.nixosSystem { modules = [ ./nixos/configuration.nix