lib: working extended lib
This commit is contained in:
parent
afb4687a3e
commit
7063ef40d9
3 changed files with 8 additions and 36 deletions
|
@ -1,36 +1,10 @@
|
||||||
{
|
{
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
withSystem,
|
withSystem,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
# inherit (inputs) self;
|
inherit (inputs.self) lib;
|
||||||
# inherit (inputs.nixpkgs) lib;
|
inherit (lib.extendedLib.builders) mkSystem;
|
||||||
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 {
|
in {
|
||||||
flake.nixosConfigurations = {
|
flake.nixosConfigurations = {
|
||||||
temperance = mkSystem {
|
temperance = mkSystem {
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
{
|
{inputs, ...}: let
|
||||||
inputs,
|
inherit (inputs) self nixpkgs;
|
||||||
lib,
|
inherit (nixpkgs) lib;
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (inputs) self;
|
|
||||||
in {
|
in {
|
||||||
mkSystem = {
|
mkSystem = {
|
||||||
withSystem,
|
withSystem,
|
||||||
|
|
|
@ -19,12 +19,13 @@
|
||||||
builders = callLibs ./builders.nix;
|
builders = callLibs ./builders.nix;
|
||||||
};
|
};
|
||||||
|
|
||||||
# This makes mkSysytem available *in addition* to `lib.extendedLib.builders.mkSystem`.
|
# This makes mkSytem available *in addition* to `lib.extendedLib.builders.mkSystem`.
|
||||||
# The syntax is a matter of preference, but it is good to make sure all custom attribute
|
# The syntax is a matter of preference, but it is good to make sure all custom attribute
|
||||||
# sets (e.g., builders) are defined and taken from a separate attrset (extendedLib) to make
|
# sets (e.g., builders) are defined and taken from a separate attrset (extendedLib) to make
|
||||||
# absolutely sure we *never* conflict with nixpkgs. Likewise, the function names inherited
|
# absolutely sure we *never* conflict with nixpkgs. Likewise, the function names inherited
|
||||||
# here should also be different from ones available under `lib` by default, i.e., you cannot
|
# here should also be different from ones available under `lib` by default, i.e., you cannot
|
||||||
# re-define functions.
|
# re-define functions.
|
||||||
|
inherit (self.extendedLib) builders;
|
||||||
inherit (self.extendedLib.builders) mkSystem;
|
inherit (self.extendedLib.builders) mkSystem;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue