Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(workflows): post update fixes #47

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
# };
};
}