From ce1a70168afee9ebd8eacbe2152d7c4bf453d45c Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Thu, 16 Oct 2025 15:47:08 +0200 Subject: [PATCH] Refactor --- users/pedro/home-configuration/default.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/users/pedro/home-configuration/default.nix b/users/pedro/home-configuration/default.nix index e1431bf..9a59aa8 100644 --- a/users/pedro/home-configuration/default.nix +++ b/users/pedro/home-configuration/default.nix @@ -1,4 +1,8 @@ -{osConfig, ...}: { +{ + osConfig, + lib, + ... +}: { imports = [ ./programs @@ -11,8 +15,8 @@ ./zsh.nix ] ++ ( - if osConfig.hm-pedro.de != "none" - then [ + lib.lists.optionals (osConfig.hm-pedro.de != "none") +[ ./browsers ./gtk.nix ./kitty.nix @@ -22,16 +26,14 @@ ./spotify.nix ./vscodium.nix ] - else [] - ) + ) ++ ( - if osConfig.hm-pedro.de == "hyprland" - then [ + lib.lists.optionals (osConfig.hm-pedro.de == "hyprland") +[ ./hyprland ./scripts ./waybar ./mako.nix ] - else [] - ); + ); }