not needed anymore

This commit is contained in:
notgne2 2022-01-17 11:37:49 -07:00
parent a871d120f5
commit ca4a9803b6
No known key found for this signature in database
GPG Key ID: BB661E172B42A7F8

View File

@ -1,48 +0,0 @@
hm:
{ configuration
, pkgs
, inputs ? { }
}:
with pkgs.lib;
let
collectFailed = cfg:
map (x: x.message) (filter (x: !x.assertion) cfg.assertions);
showWarnings = res:
let
f = w: x: builtins.trace "warning: ${w}" x;
in
fold f res res.config.warnings;
extendedLib = import "${hm}/modules/lib/stdlib-extended.nix" pkgs.lib;
hmModules =
import "${hm}/modules/modules.nix" {
inherit pkgs;
check = true;
useNixpkgsModule = false;
lib = extendedLib;
};
rawModule = extendedLib.evalModules {
modules = [ configuration ] ++ hmModules;
specialArgs = {
inherit inputs;
modulesPath = "${hm}/modules";
};
};
module = showWarnings (
let
failed = collectFailed rawModule.config;
failedStr = concatStringsSep "\n" (map (x: "- ${x}") failed);
in
if failed == [ ]
then rawModule
else throw "\nFailed assertions:\n${failedStr}"
);
in
module.config.home.activationPackage