Skip to content

Commit

Permalink
Refactor lib use
Browse files Browse the repository at this point in the history
  • Loading branch information
rake5k committed Dec 23, 2023
1 parent 01b0aef commit f52e843
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 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) listToAttrs;
inherit (nixpkgs) lib;
in
with nixcfgLib;
{
lib = { inputs }:
import ./lib { inputs = inputs // self.inputs; };

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

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

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

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

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

overlays.default = nixpkgs.lib.composeManyExtensions [
overlays.default = lib.composeManyExtensions [
(final: prev: {
shellcheckPicky = prev.writeShellScriptBin "shellcheck" ''
${inputs.nixpkgs.lib.getExe prev.shellcheck} \
Expand All @@ -152,7 +152,7 @@
})
];

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

0 comments on commit f52e843

Please sign in to comment.