treewide: refactor custom lib, merge lists in hm/nixos module (#323)

* treewide: refactor custom lib, merge lists in hm/nixos module

* lib/types(custom): clarify anythingConcatLists code

---------

Co-authored-by: raf <raf@notashelf.dev>
This commit is contained in:
diniamo 2024-07-12 00:49:44 +02:00 committed by GitHub
commit 901363d1ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 307 additions and 256 deletions

View file

@ -1,8 +1,7 @@
# Home Manager module
packages: inputs: {
packages: lib: {
config,
pkgs,
lib ? pkgs.lib,
...
}: let
inherit (lib) maintainers;
@ -10,9 +9,10 @@ packages: inputs: {
inherit (lib.lists) optional;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrsOf anything bool;
inherit (lib.nvim) neovimConfiguration;
inherit (lib.nvim.types) anythingConcatLists;
cfg = config.programs.nvf;
inherit (import ../../configuration.nix inputs) neovimConfiguration;
neovimConfigured = neovimConfiguration {
inherit pkgs;
@ -55,7 +55,7 @@ in {
};
settings = mkOption {
type = attrsOf anything;
type = attrsOf anythingConcatLists;
default = {};
description = "Attribute set of nvf preferences.";
example = literalExpression ''

View file

@ -1,8 +1,7 @@
# NixOS module
packages: inputs: {
packages: lib: {
config,
pkgs,
lib ? pkgs.lib,
...
}: let
inherit (lib) maintainers;
@ -10,9 +9,10 @@ packages: inputs: {
inherit (lib.lists) optional;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrsOf anything bool;
inherit (lib.nvim) neovimConfiguration;
inherit (lib.nvim.types) anythingConcatLists;
cfg = config.programs.nvf;
inherit (import ../../configuration.nix inputs) neovimConfiguration;
neovimConfigured = neovimConfiguration {
inherit pkgs;
@ -55,7 +55,7 @@ in {
};
settings = mkOption {
type = attrsOf anything;
type = attrsOf anythingConcatLists;
default = {};
description = "Attribute set of nvf preferences.";
example = literalExpression ''