From a0ade4d66d933e21df429dbe6acf498d5c79e25b Mon Sep 17 00:00:00 2001 From: Swarsel Date: Thu, 19 Dec 2024 11:01:01 +0100 Subject: [PATCH] feat: add caches to local installer --- SwarselSystems.org | 2 ++ scripts/swarsel-install.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/SwarselSystems.org b/SwarselSystems.org index dd68142..c86e34a 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -3054,6 +3054,8 @@ This program sets up a new NixOS host. fi sudo nixos-generate-config --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/ git add /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/hardware-configuration.nix + sudo mkdir -p /root/.local/share/nix/ + printf '{\"extra-substituters\":{\"https://nix-community.cachix.org\":true,\"https://nix-community.cachix.org https://cache.ngi0.nixos.org/\":true},\"extra-trusted-public-keys\":{\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=\":true,\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=\":true}}' > /root/.local/share/nix/trusted-settings.json green "Installing flake $target_flake" sudo nixos-rebuild --show-trace --flake .#"$target_flake" boot yellow "Please keep in mind that this is only a demo of the configuration. Things might break unexpectedly." diff --git a/scripts/swarsel-install.sh b/scripts/swarsel-install.sh index 413da9e..b01ac70 100644 --- a/scripts/swarsel-install.sh +++ b/scripts/swarsel-install.sh @@ -70,6 +70,8 @@ if [[ $local_keys != *"${pub_arr[1]}"* ]]; then fi sudo nixos-generate-config --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/ git add /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/hardware-configuration.nix +sudo mkdir -p /root/.local/share/nix/ +printf '{\"extra-substituters\":{\"https://nix-community.cachix.org\":true,\"https://nix-community.cachix.org https://cache.ngi0.nixos.org/\":true},\"extra-trusted-public-keys\":{\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=\":true,\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=\":true}}' > /root/.local/share/nix/trusted-settings.json green "Installing flake $target_flake" sudo nixos-rebuild --show-trace --flake .#"$target_flake" boot yellow "Please keep in mind that this is only a demo of the configuration. Things might break unexpectedly."