From 07069adb48ae82c1f564186fa22863eb72e51070 Mon Sep 17 00:00:00 2001 From: Joonas Onatsu Date: Thu, 24 Oct 2024 13:53:06 +0300 Subject: [PATCH] Retire cache.vedenemo.dev Signed-off-by: Joonas Onatsu --- .github/actions/build-action/install_nix.sh | 26 +++++++-------- flake.nix | 36 ++++++++++++--------- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/.github/actions/build-action/install_nix.sh b/.github/actions/build-action/install_nix.sh index 1a72c2a..9b4531a 100755 --- a/.github/actions/build-action/install_nix.sh +++ b/.github/actions/build-action/install_nix.sh @@ -12,8 +12,8 @@ set -euo pipefail # Check if Nix is already installed if nix_path="$(type -p nix || command -v nix)"; then - echo "Aborting: Nix is already installed at ${nix_path}" - exit + echo "Aborting: Nix is already installed at ${nix_path}" + exit fi echo "Installing Nix version ${NIX_VERSION}" @@ -41,9 +41,9 @@ add_config "extra-nix-path = nixpkgs=flake:nixpkgs" add_config "trusted-users = root ${USER-}" # Add default NixOS binary cache -add_config "substituters = https://cache.nixos.org/ https://cache.vedenemo.dev" +add_config "substituters = https://cache.nixos.org/" add_config "trusted-substituters = https://cache.nixos.org/" -add_config "trusted-public-keys = cache.vedenemo.dev:8NhplARANhClUSWJyLVk4WMyy1Wb4rhmWW2u8AejH9E= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" +add_config "trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" add_config "substitute = true" # Optimize store disk usage @@ -79,9 +79,9 @@ unset -f add_config # Nix installer flags installer_options=( - --nix-extra-conf-file "${workdir}/nix.conf" - --daemon - --yes + --nix-extra-conf-file "${workdir}/nix.conf" + --daemon + --yes ) echo "Nix installer options:" @@ -90,12 +90,12 @@ echo "${installer_options[*]}" # There is --retry-on-errors, but only newer curl versions support that curl_retries=5 while ! curl -sS -o "${workdir}/install" -v --fail -L "https://releases.nixos.org/nix/nix-${NIX_VERSION}/install"; do - sleep 1 - ((curl_retries--)) - if [[ ${curl_retries} -le 0 ]]; then - echo "curl retries failed" >&2 - exit 1 - fi + sleep 1 + ((curl_retries--)) + if [[ ${curl_retries} -le 0 ]]; then + echo "curl retries failed" >&2 + exit 1 + fi done sh "${workdir}/install" "${installer_options[@]}" diff --git a/flake.nix b/flake.nix index 110bee2..37bc01b 100644 --- a/flake.nix +++ b/flake.nix @@ -5,11 +5,9 @@ nixConfig = { extra-trusted-substituters = [ - "https://cache.vedenemo.dev" "https://cache.ssrcdevops.tii.ae" ]; extra-trusted-public-keys = [ - "cache.vedenemo.dev:RGHheQnb6rXGK5v9gexJZ8iWTPX6OcSeS56YeXYzOcg=" "cache.ssrcdevops.tii.ae:oOrzj9iCppf+me5/3sN/BxEkp5SaFkHfKTPPZ97xXQk=" ]; }; @@ -18,7 +16,11 @@ ghafOS.url = "github:tiiuae/ghaf"; }; - outputs = inputs @ {ghafOS, self, ...}: let + outputs = inputs @ { + ghafOS, + self, + ... + }: let # Retrieve inputs from Ghaf nixpkgs = ghafOS.inputs.nixpkgs; flake-utils = ghafOS.inputs.flake-utils; @@ -37,7 +39,6 @@ generateHwConfig = import ./config-processor-hardware.nix {inherit ghafOS self lib;}; generateInstConfig = import ./config-processor-installers.nix {inherit ghafOS self lib;}; in - flake-parts.lib.mkFlake { inherit inputs; @@ -50,18 +51,21 @@ "x86_64-linux" ]; - imports = [ - ./hydrajobs/flake-module.nix - ./modules/flake-module.nix - ] ++ map generateHwConfig [ - (import ./hardware/fmo-os-rugged-laptop-7330.nix) - (import ./hardware/fmo-os-rugged-laptop-7330-public.nix) - (import ./hardware/fmo-os-rugged-tablet-7230.nix) - (import ./hardware/fmo-os-rugged-tablet-7230-public.nix) - ] ++ map generateInstConfig [ - (import ./installers/fmo-os-installer.nix) - (import ./installers/fmo-os-installer-public.nix) - ]; + imports = + [ + ./hydrajobs/flake-module.nix + ./modules/flake-module.nix + ] + ++ map generateHwConfig [ + (import ./hardware/fmo-os-rugged-laptop-7330.nix) + (import ./hardware/fmo-os-rugged-laptop-7330-public.nix) + (import ./hardware/fmo-os-rugged-tablet-7230.nix) + (import ./hardware/fmo-os-rugged-tablet-7230-public.nix) + ] + ++ map generateInstConfig [ + (import ./installers/fmo-os-installer.nix) + (import ./installers/fmo-os-installer-public.nix) + ]; flake.lib = lib; };