refactor(flake): use nixpkgs lib directly
This commit is contained in:
10
flake.nix
10
flake.nix
@@ -75,8 +75,10 @@
|
||||
outputs =
|
||||
{ self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
flake = import ./flake { inherit lib inputs self; };
|
||||
flake = import ./flake {
|
||||
lib = nixpkgs.lib;
|
||||
inherit inputs self;
|
||||
};
|
||||
in
|
||||
{
|
||||
# Every host under hosts/ is discovered and built.
|
||||
@@ -96,12 +98,12 @@
|
||||
};
|
||||
|
||||
# `nix flake check` builds every discovered host toplevel.
|
||||
checks.x86_64-linux = lib.mapAttrs (
|
||||
checks.x86_64-linux = nixpkgs.lib.mapAttrs (
|
||||
name: host:
|
||||
if host.config.warnings == [ ] then
|
||||
host.config.system.build.toplevel
|
||||
else
|
||||
throw "Host ${name} has evaluation warnings:\n${lib.concatStringsSep "\n" host.config.warnings}"
|
||||
throw "Host ${name} has evaluation warnings:\n${nixpkgs.lib.concatStringsSep "\n" host.config.warnings}"
|
||||
) self.nixosConfigurations;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user