lib: initial commit, start of custom lib
This commit is contained in:
parent
a83fe448d9
commit
f4373bac52
9 changed files with 102 additions and 71 deletions
31
parts/lib/builders.nix
Normal file
31
parts/lib/builders.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
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;
|
||||
}
|
||||
);
|
||||
}
|
17
parts/lib/default.nix
Normal file
17
parts/lib/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
callLibs = path: import path {inherit inputs lib self;};
|
||||
sussyLib = inputs.nixpkgs.lib.extend (final: prev: {
|
||||
builders = callLibs ./builders.nix;
|
||||
});
|
||||
in {
|
||||
flake = {
|
||||
lib = sussyLib;
|
||||
# raf what the hell does this do you made me set it
|
||||
_module.args.lib = sussyLib;
|
||||
};
|
||||
}
|
0
parts/lib/systemd.nix
Normal file
0
parts/lib/systemd.nix
Normal file
Loading…
Add table
Add a link
Reference in a new issue