Skip to content

Commit

Permalink
fixup! Refactor lib use
Browse files Browse the repository at this point in the history
  • Loading branch information
rake5k committed Jan 3, 2024
1 parent d492a6a commit 89de3f1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,27 @@
inherit inputs;
};
inherit (inputs.flake-utils.lib.system) aarch64-darwin aarch64-linux x86_64-linux;
inherit (nixpkgs) lib;
inherit (nixpkgs.lib) composeManyExtensions getExe listToAttrs mkForce recursiveUpdate;
in
with nixcfgLib;
{
lib = { inputs }:
import ./lib { inputs = inputs // self.inputs; };

darwinConfigurations = lib.listToAttrs [
darwinConfigurations = listToAttrs [
(mkNixDarwin aarch64-darwin "macos")
];

homeConfigurations = lib.listToAttrs [
homeConfigurations = listToAttrs [
(mkHome x86_64-linux "christian@non-nixos")
(mkHome x86_64-linux "demo@non-nixos")
];

nixosConfigurations = lib.listToAttrs [
nixosConfigurations = listToAttrs [
(mkNixos x86_64-linux "nixos")
];

nixOnDroidConfigurations = lib.listToAttrs [
nixOnDroidConfigurations = listToAttrs [
(mkNixOnDroid aarch64-linux "nix-on-droid")
];

Expand Down Expand Up @@ -142,17 +142,17 @@
})
];

overlays.default = lib.composeManyExtensions [
overlays.default = composeManyExtensions [
(final: prev: {
shellcheckPicky = prev.writeShellScriptBin "shellcheck" ''
${inputs.nixpkgs.lib.getExe prev.shellcheck} \
${getExe prev.shellcheck} \
--check-sourced --enable all --external-sources \
"$@"
'';
})
];

checks = lib.recursiveUpdate
checks = recursiveUpdate
(mkForEachSystem [
(mkGeneric "pre-commit-check" (system:
let
Expand All @@ -167,7 +167,7 @@
nixpkgs-fmt.enable = true;
shellcheck = {
enable = true;
entry = lib.mkForce "${lib.getExe pkgs.shellcheckPicky}";
entry = mkForce "${getExe pkgs.shellcheckPicky}";
};
statix.enable = true;
};
Expand Down

0 comments on commit 89de3f1

Please sign in to comment.