From f5ed731abbc38d765333b005b9815a5f6d3e59c2 Mon Sep 17 00:00:00 2001 From: Kleidi Bujari Date: Tue, 10 Dec 2024 13:24:51 -0500 Subject: Finalize working configs and prior to adding secrets System configurations in a known good state. Secrets still have to be integrated, at this point the nixos-anywhere project will likely handle this to keep the bootstrap completely automatic since it can copy ssh host keys to the host prior to install/activation. This would work nicely with the sops secret module, but a good way to manage host keys for each machine still has to be decided. --- machines/flake-module.nix | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) (limited to 'machines/flake-module.nix') diff --git a/machines/flake-module.nix b/machines/flake-module.nix index d06bfc2..8d9dd2c 100644 --- a/machines/flake-module.nix +++ b/machines/flake-module.nix @@ -2,6 +2,7 @@ let inherit (lib) nixosSystem; inherit (self.nixosModules) xnet xlib; + inherit (self) inputs; in { flake.nixosConfigurations = { @@ -16,14 +17,34 @@ in modules = [ ./iso ]; }; - # t1 = nixosSystem { - # system = "x86_64-linux"; - # modules = [ ./t1 ]; - # }; - # - # iridium = nixosSystem { - # system = "x86_64-linux"; - # modules = [ ./iridium ]; - # }; + t1 = nixosSystem { + system = "x86_64-linux"; + modules = [ ./t1 xnet ]; + }; + + iridium = nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ ./iridium xnet ]; + }; + }; + + perSystem = { pkgs, inputs', ... }: { + packages.xinstall = + let + disko = inputs'.disko.packages.disko-install; + + configs = builtins.concatStringsSep " " + (builtins.filter (x: x != "iso") + (builtins.attrNames self.nixosConfigurations)); + in + pkgs.writeShellScriptBin "xinstall" '' + set -euo pipefail + + FLAKE="github:kbujari/depot" + TARGET=$(${pkgs.gum}/bin/gum choose ${configs}) + + # ${disko}/bin/disko-install --help + ''; }; } -- cgit v1.3.1