update: fixed issues and update flake inputs

This commit is contained in:
danny 2025-12-29 16:03:31 +08:00
parent 4b6183f0ec
commit b3c5ad2880
80 changed files with 3307 additions and 2059 deletions

View file

@ -105,4 +105,20 @@ in
elements:
optionalString (builtins.length elements > 0) "elements = { ${concatStringsSep "," elements} }";
};
getMonitors =
profileName: config:
let
inherit (lib)
pipe
filter
elemAt
length
;
in
(pipe config.services.kanshi.settings [
(x: filter (p: p.profile.name == profileName) x)
(x: if (length x > 0) then elemAt x 0 else { profile.outputs = [ ]; })
(x: x.profile.outputs)
]);
}