mirror of
https://github.com/nix-community/home-manager
synced 2024-11-21 20:23:08 +00:00
lib: remove top-level with lib
This commit is contained in:
parent
71902bc913
commit
3ccddfc48d
10 changed files with 23 additions and 24 deletions
|
@ -9,9 +9,8 @@
|
|||
|
||||
{ lib }:
|
||||
|
||||
with lib;
|
||||
|
||||
rec {
|
||||
let inherit (lib) all any filterAttrs mapAttrs mapAttrsToList toposort;
|
||||
in rec {
|
||||
|
||||
emptyDag = { };
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{ homeDirectory, lib, pkgs }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib) hasPrefix hm literalExpression mkDefault mkIf mkOption removePrefix types;
|
||||
in
|
||||
{
|
||||
# Constructs a type suitable for a `home.file` like option. The
|
||||
# target path may be either absolute or relative, in which case it
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
|
||||
{ lib }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
concatMapStringsSep concatStrings escape hasPrefix head replaceStrings;
|
||||
|
||||
mkPrimitive = t: v: {
|
||||
_type = "gvariant";
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{ lib }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
let
|
||||
inherit (lib)
|
||||
genList length lowerChars replaceStrings stringToCharacters upperChars;
|
||||
in {
|
||||
# Figures out a valid Nix store name for the given path.
|
||||
storeFileName = path:
|
||||
let
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{ dag, lib }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
concatStringsSep defaultFunctor fixedWidthNumber imap1 isAttrs isList length
|
||||
listToAttrs mapAttrs mkIf mkOption mkOptionType nameValuePair stringLength
|
||||
types warn;
|
||||
|
||||
isDagEntry = e: isAttrs e && (e ? data) && (e ? after) && (e ? before);
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{ lib, dag ? import ./dag.nix { inherit lib; }
|
||||
, gvariant ? import ./gvariant.nix { inherit lib; } }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
all concatMap foldl' getFiles getValues head isFunction literalExpression
|
||||
mergeAttrs mergeDefaultOption mergeOneOption mergeOptions mkOption
|
||||
mkOptionType showFiles showOption types;
|
||||
|
||||
typesDag = import ./types-dag.nix { inherit dag lib; };
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib) concatStringsSep hm mkMerge mkOption types;
|
||||
|
||||
dag = lib.hm.dag;
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib) concatStringsSep hm mkOption types;
|
||||
|
||||
dag = lib.hm.dag;
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
let inherit (lib) concatStringsSep hm mapAttrsToList mkMerge mkOption types;
|
||||
in {
|
||||
options.examples = mkOption { type = types.attrsOf hm.types.gvariant; };
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib) concatStringsSep hm mkMerge mkOption types;
|
||||
|
||||
dag = lib.hm.dag;
|
||||
|
||||
|
|
Loading…
Reference in a new issue