lib: initial commit, start of custom lib

This commit is contained in:
Charlie Root 2024-08-28 18:17:55 +02:00
commit f4373bac52
9 changed files with 102 additions and 71 deletions

View file

@ -3,49 +3,51 @@
withSystem,
...
}: let
inherit (inputs) self;
# inherit (inputs) self;
inherit (inputs.nixpkgs) lib;
mkSystem = {
withSystem,
system,
...
} @ args:
withSystem system (
{
inputs',
self',
...
}:
lib.nixosSystem {
inherit system;
specialArgs =
lib.recursiveUpdate
{
inherit lib;
inherit inputs inputs';
inherit self self';
}
(args.specialArgs or {});
inherit (args) modules;
}
);
inherit (lib.builders) mkSystem;
# mkSystem = {
# withSystem,
# system,
# ...
# } @ args:
# withSystem system (
# {
# inputs',
# self',
# ...
# }:
# lib.nixosSystem {
# inherit system;
# specialArgs =
# lib.recursiveUpdate
# {
# inherit lib;
# inherit inputs inputs';
# inherit self self';
# }
# (args.specialArgs or {});
# inherit (args) modules;
# }
# );
in {
temperance = mkSystem {
inherit withSystem;
system = "x86_64-linux";
modules = [
./vali/temperance
../modules
];
};
flake.nixosConfigurations = {
temperance = mkSystem {
inherit withSystem;
system = "x86_64-linux";
modules = [
./vali/temperance
../modules
];
};
hermit = mkSystem {
inherit withSystem;
system = "x86_64-linux";
modules = [
./vali/hermit
../modules
];
hermit = mkSystem {
inherit withSystem;
system = "x86_64-linux";
modules = [
./vali/hermit
../modules
];
};
};
}