From 4a381f03d36ef7084d81e4d88dff7b5903fce399 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Thu, 18 Mar 2021 23:51:38 +0000 Subject: [PATCH] ops/nixos: create installcd --- ops/nixos/default.nix | 2 ++ ops/nixos/installcd/default.nix | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 ops/nixos/installcd/default.nix diff --git a/ops/nixos/default.nix b/ops/nixos/default.nix index 021b414e83..488a425eb1 100644 --- a/ops/nixos/default.nix +++ b/ops/nixos/default.nix @@ -58,12 +58,14 @@ let builtins.listToAttrs (builtins.concatLists (lib.mapAttrsToList exportersForSystem evaledSystems)); netbootSystem = systemFor "netboot" (import ./netboot); + installcdSystem = systemFor "installcd" (import ./installcd); in systemDrvs // { systems = systemDrvs; systemExporters = systemExporters; tailscaleIPs = systemTailscaleIPs; netboot = netbootSystem.config.system.build.pixiecore; + installcd = installcdSystem.config.system.build.isoImage; systemPathJSON = pkgs.writeText "systems.json" (builtins.toJSON systemDrvs); } diff --git a/ops/nixos/installcd/default.nix b/ops/nixos/installcd/default.nix new file mode 100644 index 0000000000..f434405d01 --- /dev/null +++ b/ops/nixos/installcd/default.nix @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2020 Luke Granger-Brown +# +# SPDX-License-Identifier: Apache-2.0 + +{ depot, lib, pkgs, rebuilder, config, ... }: +let + inherit (depot.ops) secrets; +in { + imports = [ + ../../../third_party/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix + ]; + + isoImage.isoName = lib.mkForce "nixos-${depot.version}-${pkgs.stdenv.hostPlatform.system}.iso"; + + isoImage.contents = lib.mkAfter [{ + source = /home/lukegb/depot; + target = "/depot"; + }]; + + system.stateVersion = "21.05"; +}