mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-21 06:51:28 +01:00
chore: remove dead configuration (#352)
Drop declarations that nothing references, including the incorrect `attrs.listToAttrs = lib.genAttrs` alias.
This commit is contained in:
1 parent
a902678522
commit
8b37fc0a7d
7 files changed
-137
No files matched your search
@@ -1,47 +0,0 @@
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/lib/attrsets.nix
|
||||
{ lib, ... }:
|
||||
{
|
||||
# Generate an attribute set from a list.
|
||||
#
|
||||
# lib.genAttrs [ "foo" "bar" ] (name: "x_" + name)
|
||||
# => { foo = "x_foo"; bar = "x_bar"; }
|
||||
listToAttrs = lib.genAttrs;
|
||||
|
||||
# Update only the values of the given attribute set.
|
||||
#
|
||||
# mapAttrs
|
||||
# (name: value: ("bar-" + value))
|
||||
# { x = "a"; y = "b"; }
|
||||
# => { x = "bar-a"; y = "bar-b"; }
|
||||
inherit (lib.attrsets) mapAttrs;
|
||||
|
||||
# Update both the names and values of the given attribute set.
|
||||
#
|
||||
# mapAttrs'
|
||||
# (name: value: nameValuePair ("foo_" + name) ("bar-" + value))
|
||||
# { x = "a"; y = "b"; }
|
||||
# => { foo_x = "bar-a"; foo_y = "bar-b"; }
|
||||
inherit (lib.attrsets) mapAttrs';
|
||||
|
||||
# Merge a list of attribute sets into one. smilar to the operator `a // b`, but for a list of attribute sets.
|
||||
# NOTE: the later attribute set overrides the former one!
|
||||
#
|
||||
# mergeAttrsList
|
||||
# [ { x = "a"; y = "b"; } { x = "c"; z = "d"; } { g = "e"; } ]
|
||||
# => { x = "c"; y = "b"; z = "d"; g = "e"; }
|
||||
inherit (lib.attrsets) mergeAttrsList;
|
||||
|
||||
# Generate a string from an attribute set.
|
||||
#
|
||||
# attrsets.foldlAttrs
|
||||
# (acc: name: value: acc + "\nexport ${name}=${value}")
|
||||
# "# A shell script"
|
||||
# { x = "a"; y = "b"; }
|
||||
# =>
|
||||
# ```
|
||||
# # A shell script
|
||||
# export x=a
|
||||
# export y=b
|
||||
# ````
|
||||
inherit (lib.attrsets) foldlAttrs;
|
||||
}
|
||||
@@ -4,8 +4,6 @@
|
||||
macosSystem = import ./macosSystem.nix;
|
||||
nixosSystem = import ./nixosSystem.nix;
|
||||
|
||||
attrs = import ./attrs.nix { inherit lib; };
|
||||
|
||||
genK3sServerModule = import ./genK3sServerModule.nix;
|
||||
genK3sAgentModule = import ./genK3sAgentModule.nix;
|
||||
genVmHostModule = import ./genVmHostModule.nix;
|
||||
|
||||
Reference in new issue
Block a user