From 3c2f7173c7620e14ef349ab36df14bf07f109d66 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 28 Nov 2023 23:04:57 +0200 Subject: (autoconfig/packages) Added support for pkg-settings without ref --- autoconfig.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/autoconfig.nix b/autoconfig.nix index 0d2055c..06021ee 100644 --- a/autoconfig.nix +++ b/autoconfig.nix @@ -31,7 +31,9 @@ in { config-from-group = lib.foldlAttrs (acc: pkg-name: pkg-settings: - if pkg-name == "list" then + if pkg-name == "for" then + acc + else if pkg-name == "list" then _mergeAttrs [ acc { @@ -41,9 +43,12 @@ in { _mergeAttrs [ acc (lib.filterAttrs (name: _: name != "ref") pkg-settings) - { - environment.systemPackages = [pkg-settings.ref]; - }]) + (if pkg-settings ? ref then + { + environment.systemPackages = [pkg-settings.ref]; + } + else + {} )]) {} package-group; in -- cgit v1.3.1-23-gd82d