Fix match

This commit is contained in:
muon 2025-01-02 12:57:39 +00:00
parent ddf8280804
commit aaa78b5079

View file

@ -1,12 +1,15 @@
{ builtins, inputs, system, pkgs, ... }: { { builtins, inputs, system, pkgs, ... }: {
mkHost = host: mkHost = host:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
specialArgs = let name = builtins.match "muho" (builtins.toString host); specialArgs = with builtins;
in if name == "muho" then { let
inherit inputs system pkgs; hasInfix = infix: content: match ".*${infix}.*" "${content}" != null;
} else { muho = hasInfix "/muho/" (toString host);
inherit inputs system; in if muho then {
}; inherit inputs system pkgs;
} else {
inherit inputs system;
};
modules = [ modules = [
host host