mirror of
https://git.oat.zone/dark-firepit/dotfiles
synced 2024-11-23 02:12:26 +01:00
.. | ||
colors.nix | ||
default.nix | ||
modules.nix | ||
nixos.nix | ||
pkgs.nix | ||
README.md | ||
utils.nix |
Lib
The default.nix
defines a lib extended with a _
attribute under which mine
custom lib functions live. The default.nix
loads every .nix
file in the
libs
(current) directory and imports it.
The importing is quite simple:
- First the
libsInFolder
reads the contents of thelibs
directory, filters out non.nix
files and thedefault.nix
file and then returns a list of paths to the individual.nix
files it found. - This list gets passed to
importLibs
which imports the libraries and merges the individual imported attribute sets together, so that all the functions are available directly under one attribute set. - This attribute then gets bind to the
_
attribute in thelib
extension.
Individual .nix
files can use the functions defined in other local library
files normally using the nix._.someFunctionName
.
Overview
TODO