Skip to content

Commit

Permalink
Merge pull request #47 from tsandrini/parts-update
Browse files Browse the repository at this point in the history
ci(workflows): post update fixes
  • Loading branch information
tsandrini authored Aug 5, 2024
2 parents 9eac892 + 1b450c4 commit 89740c0
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 58 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/cachix-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/flake-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/flakehub-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
99 changes: 47 additions & 52 deletions flake-parts/homes/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,65 +12,60 @@
# 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;
default = { };
};

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;
# };
};
}

0 comments on commit 89740c0

Please sign in to comment.