ref: make onion with flake-utils

This commit is contained in:
David Arnold 2021-04-17 20:56:24 -05:00
parent 6cccb55263
commit 9dca402914
5 changed files with 14 additions and 11 deletions

View file

@ -12,8 +12,6 @@
lib = prev.lib.extend (lfinal: lprev: { lib = prev.lib.extend (lfinal: lprev: {
inherit lib; inherit lib;
inherit (lib) nixosSystem; inherit (lib) nixosSystem;
utils = inputs.utils.lib;
}); });
}) })
(overridesOverlay overridePkgs) (overridesOverlay overridePkgs)

View file

@ -30,6 +30,11 @@
lists = callLibs ./lists.nix; lists = callLibs ./lists.nix;
strings = callLibs ./strings.nix; strings = callLibs ./strings.nix;
in in
utils.lib
//
{ {
inherit callLibs; inherit callLibs;
@ -47,19 +52,19 @@
pathsToImportedAttrs concatAttrs filterPackages; pathsToImportedAttrs concatAttrs filterPackages;
inherit (lists) pathsIn; inherit (lists) pathsIn;
inherit (strings) rgxToString; inherit (strings) rgxToString;
}); }
);
in in
{ {
# ... but don't force that choice onto the user # ... but don't force that choice onto the user
lib = { lib = utils.lib // {
mkFlake = combinedLib.mkFlake; mkFlake = combinedLib.mkFlake;
pkgs-lib = combinedLib.pkgs-lib; pkgs-lib = combinedLib.pkgs-lib;
}; };
} }
// //

View file

@ -1,4 +1,4 @@
{ lib, utils, deploy, ... }: { lib, deploy, ... }:
let let
inherit (dev) os; inherit (dev) os;
in in
@ -31,7 +31,7 @@ let
deploy.nodes = os.mkNodes deploy userFlakeSelf.nixosConfigurations; deploy.nodes = os.mkNodes deploy userFlakeSelf.nixosConfigurations;
}; };
systemOutputs = utils.lib.eachDefaultSystem (system: systemOutputs = lib.eachDefaultSystem (system:
let let
pkgs = multiPkgs.${system}; pkgs = multiPkgs.${system};
pkgs-lib = lib.pkgs-lib.${system}; pkgs-lib = lib.pkgs-lib.${system};

View file

@ -1,4 +1,4 @@
{ userFlakeSelf, lib, nixpkgs, utils, ... }: { userFlakeSelf, lib, nixpkgs, ... }:
{ args }: { args }:
let let
@ -190,7 +190,7 @@ let
}; };
supportedSystems = mkOption { supportedSystems = mkOption {
type = listOf str; type = listOf str;
default = utils.lib.defaultSystems; default = lib.defaultSystems;
description = '' description = ''
The systems supported by this flake The systems supported by this flake
''; '';

View file

@ -1,5 +1,5 @@
args@{ lib, utils, nixpkgs, ... }: args@{ lib, nixpkgs, ... }:
lib.genAttrs utils.lib.defaultSystems (system: lib.genAttrs lib.defaultSystems (system:
lib.makeExtensible (final: lib.makeExtensible (final:
let let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };