mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: add caches to local installer
This commit is contained in:
parent
7b0d2ee700
commit
a0ade4d66d
2 changed files with 4 additions and 0 deletions
|
|
@ -3054,6 +3054,8 @@ This program sets up a new NixOS host.
|
||||||
fi
|
fi
|
||||||
sudo nixos-generate-config --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/
|
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
|
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"
|
green "Installing flake $target_flake"
|
||||||
sudo nixos-rebuild --show-trace --flake .#"$target_flake" boot
|
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."
|
yellow "Please keep in mind that this is only a demo of the configuration. Things might break unexpectedly."
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,8 @@ if [[ $local_keys != *"${pub_arr[1]}"* ]]; then
|
||||||
fi
|
fi
|
||||||
sudo nixos-generate-config --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/
|
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
|
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"
|
green "Installing flake $target_flake"
|
||||||
sudo nixos-rebuild --show-trace --flake .#"$target_flake" boot
|
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."
|
yellow "Please keep in mind that this is only a demo of the configuration. Things might break unexpectedly."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue