flake.nix: get rid of flake-utils

The function `flake-utils.lib.eachDefaultSystem` is superfluous and can be
substituted by native `nixpkgs.lib` functionality.
This commit is contained in:
Anderson Torres 2023-04-14 07:42:03 -03:00 committed by GitHub
parent 9f78c6de4f
commit 17198cf5ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,9 +2,8 @@
description = "Home Manager for Nix";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, utils, ... }:
outputs = { self, nixpkgs, ... }:
{
nixosModules = rec {
home-manager = import ./nixos;
@ -84,23 +83,29 @@
};
});
};
} // utils.lib.eachDefaultSystem (system:
} // (let
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
in {
devShells = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
tests = import ./tests { inherit pkgs; };
in tests.run);
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
docs = import ./docs { inherit pkgs; };
tests = import ./tests { inherit pkgs; };
hmPkg = pkgs.callPackage ./home-manager { };
in {
devShells.tests = tests.run;
packages = {
default = hmPkg;
home-manager = hmPkg;
docs-html = docs.manual.html;
docs-json = docs.options.json;
docs-manpages = docs.manPages;
};
# deprecated in Nix 2.7
defaultPackage = self.packages.${system}.default;
});
defaultPackage = forAllSystems (system: self.packages.${system}.default);
});
}