From c87b8487ed71f0cc72553e8f45bf22e1a922af4a Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Fri, 26 Jan 2024 00:11:42 -0600 Subject: [PATCH] add the cache links to nixConfig now that I actually understand it --- .github/workflows/build.yml | 12 ------------ flake.nix | 12 ++++++++++++ modules/nix.nix | 5 ----- styx | 3 ++- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee54c44..a66499d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,18 +22,6 @@ jobs: - uses: cachix/install-nix-action@v25 # v25 with: nix_path: nixpkgs=channel:nixos-unstable - extra_nix_config: > - trusted-public-keys = - hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc= - nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA= - daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k= - cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= - - substituters = - https://hyprland.cachix.org - https://nixpkgs-wayland.cachix.org - https://daylin.cachix.org - https://cache.nixos.org - uses: DeterminateSystems/magic-nix-cache-action@v2 - uses: cachix/cachix-action@v14 diff --git a/flake.nix b/flake.nix index 67e4c1f..7f32d55 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,18 @@ wezterm.inputs.nixpkgs.follows = "nixpkgs"; }; + nixConfig = { + extra-substituters = [ + "https://hyprland.cachix.org" + "https://nixpkgs-wayland.cachix.org" + "https://daylin.cachix.org" + ]; + extra-trusted-public-keys = [ + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" + "daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k=" + ]; + }; outputs = inputs @ { self, nixpkgs, diff --git a/modules/nix.nix b/modules/nix.nix index a30d389..84c5105 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -26,15 +26,10 @@ trusted-users = ["@wheel"]; accept-flake-config = true; - # nixConfig = { substituters = [ - "https://hyprland.cachix.org" - "https://nixpkgs-wayland.cachix.org" "https://daylin.cachix.org" ]; trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" "daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k=" ]; }; diff --git a/styx b/styx index e37ae7a..4da2aae 100755 --- a/styx +++ b/styx @@ -76,7 +76,8 @@ cache() { cachix watch-exec daylin \ -- \ nix build "$FLAKE_PATH#nixosConfigurations.${HOSTNAME}.config.system.build.toplevel" \ - --print-build-logs + --print-build-logs \ + --accept-flake-config end=$(date +%s) runtime=$(date -d@$((end-start)) +'%M minutes, %S seconds')