lib: trying to extend the default NixOS library, NOT WORKING ATM

This commit is contained in:
Charlie Root 2024-08-30 20:11:05 +02:00
commit 08d7bc266b
3 changed files with 44 additions and 40 deletions

View file

@ -1,35 +1,36 @@
{ {
inputs, inputs,
lib,
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

@ -1,9 +1,10 @@
{ {
lib,
inputs, inputs,
self, lib,
... ...
}: { }: let
inherit (inputs) self;
in {
mkSystem = { mkSystem = {
withSystem, withSystem,
system, system,

View file

@ -1,17 +1,19 @@
{ {inputs, ...}: let
inputs, callLibs = path:
lib, import path {
self, inherit inputs;
... inherit lib;
}: let };
callLibs = path: import path {inherit inputs lib self;}; lib = inputs.nixpkgs.lib.extend {
sussyLib = inputs.nixpkgs.lib.extend (final: prev: {
builders = callLibs ./builders.nix; builders = callLibs ./builders.nix;
}); };
in { in {
perSystem = {
_module.args.lib = lib;
};
flake = { flake = {
lib = sussyLib; inherit lib;
# raf what the hell does this do you made me set it # raf what the hell does this do you made me set it
_module.args.lib = sussyLib; _module.args.lib = lib;
}; };
} }