From f25753aaa36770888bc83f165f44b583582937c3 Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Sun, 13 Oct 2024 01:25:15 +0530 Subject: [PATCH] Upload generated ISO artifacts --- .github/workflows/generators.yml | 10 ++++++++++ README.md | 4 ++-- flake.nix | 4 ++-- generators/README.md | 2 +- generators/{minimal-iso.nix => minimal.nix} | 2 +- machines/clawsiecats/anywhere.sh | 2 +- 6 files changed, 17 insertions(+), 7 deletions(-) rename generators/{minimal-iso.nix => minimal.nix} (97%) diff --git a/.github/workflows/generators.yml b/.github/workflows/generators.yml index 274a0d7..f11eb40 100644 --- a/.github/workflows/generators.yml +++ b/.github/workflows/generators.yml @@ -15,6 +15,11 @@ jobs: - name: Build .#minimal-iso run: | nix build .#minimal-iso + - name: Upload ISO + uses: actions/upload-artifact@v4 + with: + name: nixoss.iso + path: ./result/iso/nixos.iso minimal-install-iso: runs-on: ubuntu-latest @@ -26,3 +31,8 @@ jobs: - name: Build .#minimal-install-iso run: | nix build .#minimal-install-iso + - name: Upload ISO + uses: actions/upload-artifact@v4 + with: + name: nixoss.iso + path: ./result/iso/*.iso diff --git a/README.md b/README.md index f6b1cc7..5261e65 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ $ sudo shutdown -r now ### Clawsiecats A configuration optimized for limited compute availability, supposed to be deployed on VPS machines. -It hosts routing services, VPN, some other useful stuff. +It hosts routing services, tailscale, some other useful stuff. Uncomment the disko partioning configuration that should be used in [flake.nix](/flake.nix) under the variant before deployment. Supports MBR, GPT, GPT+LUKS. I haven't gotten MBR+LUKS working yet. @@ -53,7 +53,7 @@ Looks to work fine on the most minimal [Vultr](https://www.vultr.com/) configura **Deployment Steps** -1. Replace your SSH public keys in [minimal-iso.nix](/generators/minimal-iso.nix). +1. Replace your SSH public keys in [minimal.nix](/generators/minimal.nix). 2. Build the minimal ISO: ```bash diff --git a/flake.nix b/flake.nix index d8e4e6a..0509dd6 100644 --- a/flake.nix +++ b/flake.nix @@ -232,13 +232,13 @@ minimal-iso = nixos-generators.nixosGenerate { system = "x86_64-linux"; - modules = [ ./generators/minimal-iso.nix ]; + modules = [ ./generators/minimal.nix ]; format = "iso"; }; minimal-install-iso = nixos-generators.nixosGenerate { system = "x86_64-linux"; - modules = [ ./generators/minimal-iso.nix ]; + modules = [ ./generators/minimal.nix ]; format = "install-iso"; }; }; diff --git a/generators/README.md b/generators/README.md index 267442d..3652fd7 100644 --- a/generators/README.md +++ b/generators/README.md @@ -1,3 +1,3 @@ ``` -$ nix build .#minimal-iso +$ nix build '.#minimal-iso' ``` diff --git a/generators/minimal-iso.nix b/generators/minimal.nix similarity index 97% rename from generators/minimal-iso.nix rename to generators/minimal.nix index 046e2d4..c23f473 100644 --- a/generators/minimal-iso.nix +++ b/generators/minimal.nix @@ -1,5 +1,5 @@ { - networking.hostName = "minimal-iso"; + networking.hostName = "minimal"; # Helpful for tinkering within the installation environment. # fileSystems."/root" = { diff --git a/machines/clawsiecats/anywhere.sh b/machines/clawsiecats/anywhere.sh index c56dbb8..2f3e930 100755 --- a/machines/clawsiecats/anywhere.sh +++ b/machines/clawsiecats/anywhere.sh @@ -20,7 +20,7 @@ systemd-machine-id-setup --root="$BASEDIR"/nix/persist/system/ # Host SSH keys; also used by sops-nix for decrypting secrets. install -d -m755 "$BASEDIR"/nix/persist/system/etc/ssh/ -, sops decrypt ./machines/secrets.yaml \ +nix run nixpkgs#sops -- decrypt ./machines/secrets.yaml \ --extract '["clawsiecats_ssh_host_ed25519_key"]' \ --output "$BASEDIR"/nix/persist/system/etc/ssh/ssh_host_ed25519_key chmod 600 "$BASEDIR"/nix/persist/system/etc/ssh/ssh_host_ed25519_key