chore: initial commit

This commit is contained in:
technofab 2025-07-15 19:28:42 +02:00
commit 7602719790
No known key found for this signature in database
24 changed files with 1916 additions and 0 deletions

33
lib/flakeModule.nix Normal file
View file

@ -0,0 +1,33 @@
{
flake-parts-lib,
lib,
...
}: let
inherit (lib) mkOption types;
in {
options.perSystem = flake-parts-lib.mkPerSystemOption (
{
config,
pkgs,
...
}: let
nixible-lib = import ./. {inherit pkgs lib;};
in {
options.nixible = mkOption {
type = types.attrsOf (types.submodule (args:
# needed to get pkgs in there, weirdly enough
import nixible-lib.module (args
// {
inherit pkgs;
})));
default = {};
};
config.legacyPackages = lib.fold (playbook: acc: acc // playbook) {} (
map (playbook_name: {
"nixible:${playbook_name}" = (builtins.getAttr playbook_name config.nixible).cli;
}) (builtins.attrNames config.nixible)
);
}
);
}