mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
Update library to be more concise with its inputs
This commit is contained in:
parent
2e182005ed
commit
9ab450a741
@ -128,10 +128,7 @@
|
||||
in {
|
||||
# Exposes only my library with the custom functions to make it easier to
|
||||
# include in other flakes.
|
||||
lib = import ./lib {
|
||||
inherit inputs;
|
||||
lib = nixpkgs.lib;
|
||||
};
|
||||
lib = import ./lib { lib = nixpkgs.lib; };
|
||||
|
||||
# A list of NixOS configurations from the `./hosts` folder. It also has
|
||||
# some sensible default configurations.
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ lib, ... }:
|
||||
# All of the custom functions used for this configuration.
|
||||
{ lib }:
|
||||
|
||||
rec {
|
||||
/* Create an attribute set that represents the structure of the modules
|
||||
@ -109,6 +110,11 @@ rec {
|
||||
invalidUsernames = [ "config" "modules" ];
|
||||
in lib.filterAttrs (n: _: !lib.elem n invalidUsernames && lib.elem n users) userModules;
|
||||
|
||||
|
||||
# Return the path of `user` from `type`.
|
||||
getUser = type: user:
|
||||
lib.getAttr user (getUsers type [ user ]);
|
||||
|
||||
# Return the path of `secrets` from `../secrets`.
|
||||
getSecret = path: ../secrets/${path};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# A list of utilities specifically in my flake output.
|
||||
{ lib, inputs, ... }:
|
||||
{ lib, inputs }:
|
||||
|
||||
let
|
||||
# Default system for our host configuration.
|
||||
|
Loading…
Reference in New Issue
Block a user