style(flake)!: manually import lib flake module

- Also make `lib` an `internal` option
- Unify let blocks and move them under `imports`
  (makes it clear where `config.lib` comes from)
- Fix a minor typo
This commit is contained in:
reo101 2024-09-07 20:49:14 +03:00
parent 1baef9b78c
commit 31f9e7dbef
Signed by: reo101
GPG key ID: 675AA7EF13964ACB
9 changed files with 96 additions and 82 deletions

View file

@ -1,23 +1,27 @@
{ lib, config, self, inputs, ... }:
let
inherit (config.lib)
createThings;
in
let
createPackages = baseDir:
createThings {
inherit baseDir;
thingType = "package";
raw = false;
extras.systems = {
default = lib.const true;
};
};
in
{
imports = [
../lib
];
options = let
inherit (lib) types;
inherit (lib)
types
;
inherit (config.lib)
createThings
;
createPackages = baseDir:
createThings {
inherit baseDir;
thingType = "package";
raw = false;
extras.systems = {
default = lib.const true;
};
};
in {
auto.packages = lib.mkOption {
description = ''