From 1b450c4354c2ab2ed8e04c9d650ab776355c5cc8 Mon Sep 17 00:00:00 2001 From: tsandrini Date: Mon, 5 Aug 2024 16:07:43 +0200 Subject: [PATCH] ci(workflows): post update fixes --- .github/workflows/cachix-push.yml | 11 ++- .github/workflows/flake-check.yml | 1 + .github/workflows/flakehub-publish.yml | 1 + .github/workflows/update-flake-lock.yml | 1 + flake-parts/homes/default.nix | 99 ++++++++++++------------- 5 files changed, 55 insertions(+), 58 deletions(-) diff --git a/.github/workflows/cachix-push.yml b/.github/workflows/cachix-push.yml index 6dbc3b8..680abf6 100644 --- a/.github/workflows/cachix-push.yml +++ b/.github/workflows/cachix-push.yml @@ -16,19 +16,18 @@ jobs: - name: "Installing and configuring the nix package manager..." uses: DeterminateSystems/nix-installer-action@main - - - name: "Setting up magic-nix-cache..." - uses: DeterminateSystems/magic-nix-cache-action@main with: extra-conf: | accept-flake-config = true + allow-import-from-derivation = true + + - name: "Setting up magic-nix-cache..." + uses: DeterminateSystems/magic-nix-cache-action@main - name: "Settings up cachix binary cache..." uses: cachix/cachix-action@v15 with: - name: mycache - # If you chose signing key for write access - signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" + name: tsandrini # If you chose API tokens for write access OR if you have a private cache authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" diff --git a/.github/workflows/flake-check.yml b/.github/workflows/flake-check.yml index 287b054..6693c84 100644 --- a/.github/workflows/flake-check.yml +++ b/.github/workflows/flake-check.yml @@ -23,6 +23,7 @@ jobs: with: extra-conf: | accept-flake-config = true + allow-import-from-derivation = true - name: "Setting up magic-nix-cache..." uses: DeterminateSystems/magic-nix-cache-action@main diff --git a/.github/workflows/flakehub-publish.yml b/.github/workflows/flakehub-publish.yml index 28bc630..9d8fc51 100644 --- a/.github/workflows/flakehub-publish.yml +++ b/.github/workflows/flakehub-publish.yml @@ -22,6 +22,7 @@ jobs: with: extra-conf: | accept-flake-config = true + allow-import-from-derivation = true - name: "Setting up magic-nix-cache..." uses: DeterminateSystems/magic-nix-cache-action@main diff --git a/.github/workflows/update-flake-lock.yml b/.github/workflows/update-flake-lock.yml index a16e8ec..8d70155 100644 --- a/.github/workflows/update-flake-lock.yml +++ b/.github/workflows/update-flake-lock.yml @@ -18,6 +18,7 @@ jobs: with: extra-conf: | accept-flake-config = true + allow-import-from-derivation = true - name: "Setting up magic-nix-cache..." uses: DeterminateSystems/magic-nix-cache-action@main diff --git a/flake-parts/homes/default.nix b/flake-parts/homes/default.nix index 6ba1200..6c249f3 100644 --- a/flake-parts/homes/default.nix +++ b/flake-parts/homes/default.nix @@ -12,42 +12,36 @@ # 888 88888888 888 888 "Y8888b. 888 888 888 888 888 888 88888888 "Y8888b. # Y88b. Y8b. 888 888 X88 Y88..88P 888 888 888 888 Y8b. X88 # "Y888 "Y8888 888 888 88888P' "Y88P" 888 888 888 888 "Y8888 88888P' -{ - lib, - inputs, - withSystem, - config, - ... -}: -let - mkHome = - args: home: - { - extraSpecialArgs ? { }, - extraModules ? [ ], - extraOverlays ? [ ], - ... - }: - inputs.home-manager.lib.homeManagerConfiguration { - inherit (args) pkgs; - extraSpecialArgs = { - inherit (args) system; - inherit inputs home; - } // extraSpecialArgs; - modules = - [ - { - nixpkgs.overlays = extraOverlays; - nixpkgs.config.allowUnfree = true; - } - ./${home} - ] - ++ extraModules - # Disabled by default, therefore load every module and enable via attributes - # instead of imports - ++ (lib.attrValues config.flake.homeModules); - }; -in +{ lib, config, ... }: +# let +# mkHome = +# args: home: +# { +# extraSpecialArgs ? { }, +# extraModules ? [ ], +# extraOverlays ? [ ], +# ... +# }: +# inputs.home-manager.lib.homeManagerConfiguration { +# inherit (args) pkgs; +# extraSpecialArgs = { +# inherit (args) system; +# inherit inputs home; +# } // extraSpecialArgs; +# modules = +# [ +# { +# nixpkgs.overlays = extraOverlays; +# nixpkgs.config.allowUnfree = true; +# } +# ./${home} +# ] +# ++ extraModules +# # Disabled by default, therefore load every module and enable via attributes +# # instead of imports +# ++ (lib.attrValues config.flake.homeModules); +# }; +# in { options.flake.homeConfigurations = lib.mkOption { type = with lib.types; lazyAttrsOf unspecified; @@ -55,22 +49,23 @@ in }; config = { - flake.homeConfigurations = { - "tsandrini@jetbundle" = withSystem "x86_64-linux" ( - args: - mkHome args "tsandrini@jetbundle" { - extraOverlays = with inputs; [ - neovim-nightly-overlay.overlays.default - emacs-overlay.overlays.default - nur.overlay - # (final: _prev: { nur = import inputs.nur { pkgs = final; }; }) - ]; - } - ); - }; + # TODO free up computing power since I am not using this atm + # flake.homeConfigurations = { + # "tsandrini@jetbundle" = withSystem "x86_64-linux" ( + # args: + # mkHome args "tsandrini@jetbundle" { + # extraOverlays = with inputs; [ + # neovim-nightly-overlay.overlays.default + # emacs-overlay.overlays.default + # nur.overlay + # # (final: _prev: { nur = import inputs.nur { pkgs = final; }; }) + # ]; + # } + # ); + # }; - flake.checks."x86_64-linux" = { - "home-tsandrini@jetbundle" = config.flake.homeConfigurations."tsandrini@jetbundle".config.home.path; - }; + # flake.checks."x86_64-linux" = { + # "home-tsandrini@jetbundle" = config.flake.homeConfigurations."tsandrini@jetbundle".config.home.path; + # }; }; }