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 {
|
in {
|
||||||
# Exposes only my library with the custom functions to make it easier to
|
# Exposes only my library with the custom functions to make it easier to
|
||||||
# include in other flakes.
|
# include in other flakes.
|
||||||
lib = import ./lib {
|
lib = import ./lib { lib = nixpkgs.lib; };
|
||||||
inherit inputs;
|
|
||||||
lib = nixpkgs.lib;
|
|
||||||
};
|
|
||||||
|
|
||||||
# A list of NixOS configurations from the `./hosts` folder. It also has
|
# A list of NixOS configurations from the `./hosts` folder. It also has
|
||||||
# some sensible default configurations.
|
# some sensible default configurations.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{ lib, ... }:
|
# All of the custom functions used for this configuration.
|
||||||
|
{ lib }:
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
/* Create an attribute set that represents the structure of the modules
|
/* Create an attribute set that represents the structure of the modules
|
||||||
@ -109,6 +110,11 @@ rec {
|
|||||||
invalidUsernames = [ "config" "modules" ];
|
invalidUsernames = [ "config" "modules" ];
|
||||||
in lib.filterAttrs (n: _: !lib.elem n invalidUsernames && lib.elem n users) userModules;
|
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`.
|
# Return the path of `secrets` from `../secrets`.
|
||||||
getSecret = path: ../secrets/${path};
|
getSecret = path: ../secrets/${path};
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# A list of utilities specifically in my flake output.
|
# A list of utilities specifically in my flake output.
|
||||||
{ lib, inputs, ... }:
|
{ lib, inputs }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Default system for our host configuration.
|
# Default system for our host configuration.
|
||||||
|
Loading…
Reference in New Issue
Block a user