lib: still not working, progress

This commit is contained in:
Charlie Root 2024-08-30 20:41:07 +02:00
commit a80d021d34
2 changed files with 34 additions and 35 deletions

View file

@ -4,33 +4,33 @@
withSystem, withSystem,
... ...
}: let }: let
inherit (inputs) self; # inherit (inputs) self;
inherit (inputs.nixpkgs) lib; # inherit (inputs.nixpkgs) lib;
# inherit (lib.builders) mkSystem; inherit (lib.builders) mkSystem;
mkSystem = { # mkSystem = {
withSystem, # withSystem,
system, # system,
... # ...
} @ args: # } @ args:
withSystem system ( # withSystem system (
{ # {
inputs', # inputs',
self', # self',
... # ...
}: # }:
lib.nixosSystem { # lib.nixosSystem {
inherit system; # inherit system;
specialArgs = # specialArgs =
lib.recursiveUpdate # lib.recursiveUpdate
{ # {
inherit lib; # inherit lib;
inherit inputs inputs'; # inherit inputs inputs';
inherit self self'; # inherit self self';
} # }
(args.specialArgs or {}); # (args.specialArgs or {});
inherit (args) modules; # inherit (args) modules;
} # }
); # );
in { in {
flake.nixosConfigurations = { flake.nixosConfigurations = {
temperance = mkSystem { temperance = mkSystem {

View file

@ -2,18 +2,17 @@
callLibs = path: callLibs = path:
import path { import path {
inherit inputs; inherit inputs;
inherit lib; lib = extendedLib;
}; };
lib = inputs.nixpkgs.lib.extend { extendedLib = inputs.nixpkgs.lib.extend {
builders = callLibs ./builders.nix; builders = callLibs ./builders.nix;
}; };
in { in {
perSystem = { # perSystem = {
_module.args.lib = lib; # _module.args.lib = lib;
}; # };
flake = { flake = {
inherit lib; lib = extendedLib;
# raf what the hell does this do you made me set it _module.args.lib = extendedLib;
_module.args.lib = lib;
}; };
} }