about summary refs log tree commit diff
path: root/users/glittershark
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2020-09-29T21·54-0400
committerglittershark <grfn@gws.fyi>2020-09-29T21·59+0000
commit1770396bf5eefcff2a613201a5a4d3b36b0ee9b6 (patch)
tree80746d3a53ee02d1cfa35ccb7d7e923296770c41 /users/glittershark
parentb2870615f71e2f40a1553a37e6c65b6496054c8c (diff)
feat(gs/system): Add ISO config r/1829
Add configuration for a live install iso based on the depot's nixpkgs
pin and with a couple of networking-based options tweaked a bit.

Change-Id: I208bd0f7815fe54fc805e8995a8288d7a0d36f84
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2014
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/glittershark')
-rw-r--r--users/glittershark/system/system/default.nix9
-rw-r--r--users/glittershark/system/system/iso.nix17
2 files changed, 24 insertions, 2 deletions
diff --git a/users/glittershark/system/system/default.nix b/users/glittershark/system/system/default.nix
index dd84dc71db27..12cde445fe0b 100644
--- a/users/glittershark/system/system/default.nix
+++ b/users/glittershark/system/system/default.nix
@@ -1,4 +1,4 @@
-{ depot, pkgs, ... }:
+args @ { depot, pkgs, ... }:
 
 rec {
   chupacabra = import ./machines/chupacabra.nix;
@@ -7,8 +7,13 @@ rec {
     configuration = chupacabra;
   }).system;
 
+  iso = import ./iso.nix args;
+
   # Build chupacabra in CI
-  meta.targets = [ "chupacabraSystem" ];
+  meta.targets = [
+    "chupacabraSystem"
+    "iso"
+  ];
 
   rebuilder =
     let
diff --git a/users/glittershark/system/system/iso.nix b/users/glittershark/system/system/iso.nix
new file mode 100644
index 000000000000..056922ee1e82
--- /dev/null
+++ b/users/glittershark/system/system/iso.nix
@@ -0,0 +1,17 @@
+{ pkgs, ... }:
+
+let
+  configuration = { ... }: {
+    imports = [
+      "${pkgs.nixpkgsSrc}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix"
+      "${pkgs.nixpkgsSrc}/nixos/modules/installer/cd-dvd/channel.nix"
+    ];
+
+    networking.networkmanager.enable = true;
+    networking.useDHCP = false;
+    networking.firewall.enable = false;
+    networking.wireless.enable = pkgs.lib.mkForce false;
+  };
+in (pkgs.nixos {
+  inherit configuration;
+}).config.system.build.isoImage