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, ... }: {
mkHost = host:
inputs.nixpkgs.lib.nixosSystem {
specialArgs = let name = builtins.match "muho" (builtins.toString host);
in if name == "muho" then {
inherit inputs system pkgs;
} else {
inherit inputs system;
};
specialArgs = with builtins;
let
hasInfix = infix: content: match ".*${infix}.*" "${content}" != null;
muho = hasInfix "/muho/" (toString host);
in if muho then {
inherit inputs system pkgs;
} else {
inherit inputs system;
};
modules = [
host