From c7c42c178e05106e3271a1cf1da6459c2d31a5d9 Mon Sep 17 00:00:00 2001 From: catvayor Date: Sat, 16 Mar 2024 20:03:01 +0100 Subject: [PATCH] iso --- .gitignore | 2 +- hive.nix | 32 ++++++++++++++++++++++++++++---- make-iso.sh | 3 +++ 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100755 make-iso.sh diff --git a/.gitignore b/.gitignore index b2be92b..042d299 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -result +installer-iso-image diff --git a/hive.nix b/hive.nix index 105787d..61d6780 100644 --- a/hive.nix +++ b/hive.nix @@ -7,18 +7,17 @@ in { inherit mods users; }; defaults = { pkgs, ... }: { - imports = [ - (import ) - ]; + imports = [ ]; boot.tmp.useTmpfs = true; }; kat-probook = { name, nodes, ... }: { + deployment.allowLocalDeployment = true; + imports = [ ./machines/kat-probook/configuration.nix users.root users.catvayor ]; - deployment.allowLocalDeployment = true; networking.hostName = name; }; kat-r86s = { name, nodes, ... }: { @@ -31,4 +30,29 @@ in { "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAA16foz+XzwKwyIR4wFgNIAE3Y7AfXyEsUZFVVz8Rie catvayor@katvayor" ]; }; + kat-iso = { name, ... }:{ + deployment = { + allowLocalDeployment = false; + targetHost = null; + }; + + imports = [ + + users.root + ]; + + networking = { + hostName = name; + networkmanager.enable = true; + wireless.enable = false; + }; + console.keyMap = "fr"; + + boot.supportedFilesystems = [ "bcachefs" ]; + programs.zsh.enable = true; + services.openssh.enable = true; + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAA16foz+XzwKwyIR4wFgNIAE3Y7AfXyEsUZFVVz8Rie catvayor@katvayor" + ]; + }; } diff --git a/make-iso.sh b/make-iso.sh new file mode 100755 index 0000000..92da59b --- /dev/null +++ b/make-iso.sh @@ -0,0 +1,3 @@ +#!/bin/sh +drv=$(colmena eval -E "{ nodes, ... }: nodes.kat-iso.config.system.build.isoImage" --instantiate --show-trace) +nix-store --realize --add-root "installer-iso-image" --indirect $drv