From 8600d0d0a73ed9818590d1fa5237fa8c4c4be6b2 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 16 Nov 2024 17:31:46 -0800 Subject: [PATCH] feat(home): Hyfetch & Neofetch --- homes/x86_64-linux/marley@nyx/default.nix | 1 + modules/home/programs/hyfetch/default.nix | 38 +++++++++++++++++++ .../home/programs/hyfetch}/neofetch.nix | 25 ++++++++---- old/home/programs/hyfetch.nix | 23 ----------- 4 files changed, 56 insertions(+), 31 deletions(-) create mode 100644 modules/home/programs/hyfetch/default.nix rename {old/home/programs => modules/home/programs/hyfetch}/neofetch.nix (91%) delete mode 100644 old/home/programs/hyfetch.nix diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix index 8463115..ee52b64 100644 --- a/homes/x86_64-linux/marley@nyx/default.nix +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -28,6 +28,7 @@ in git = enabled; glow = enabled; gpg = enabled; + hyfetch = enabled; journalctl = enabled; neo = enabled; systemctl = enabled; diff --git a/modules/home/programs/hyfetch/default.nix b/modules/home/programs/hyfetch/default.nix new file mode 100644 index 0000000..779697b --- /dev/null +++ b/modules/home/programs/hyfetch/default.nix @@ -0,0 +1,38 @@ +{ + lib, + config, + namespace, + ... +}: +let + inherit (lib) mkIf; + inherit (lib.${namespace}) mkEnableModule; + + cfg = config.${namespace}.programs.hyfetch; +in +{ + options = mkEnableModule "programs.hyfetch"; + + config = mkIf cfg.enable { + programs.hyfetch = { + enable = true; + + settings = { + preset = "lesbian"; + mode = "rgb"; + light_dark = "dark"; + lightness = 0.7; + color_align = { + mode = "horizontal"; + custom_colors = [ ]; + fore_back = null; + }; + backend = "neofetch"; + args = null; + distro = null; + pride_month_shown = [ ]; + pride_month_disable = false; + }; + }; + }; +} diff --git a/old/home/programs/neofetch.nix b/modules/home/programs/hyfetch/neofetch.nix similarity index 91% rename from old/home/programs/neofetch.nix rename to modules/home/programs/hyfetch/neofetch.nix index 436b4c1..48e59b8 100644 --- a/old/home/programs/neofetch.nix +++ b/modules/home/programs/hyfetch/neofetch.nix @@ -1,14 +1,23 @@ -{ pkgs, ... }: { - # TODO: Switch to fastfetch - home.packages = with pkgs; [ - neofetch - ]; + lib, + config, + namespace, + pkgs, + ... +}: +let + inherit (lib) mkIf; - xdg.configFile."neofetch/config.conf" = { - enable = true; + cfg = config.${namespace}.programs.hyfetch; +in +{ + config = mkIf cfg.enable { + # TODO: Switch to fastfetch + home.packages = with pkgs; [ + neofetch + ]; - text = # bash + xdg.configFile."neofetch/config.conf".text = # bash '' print_info() { prin " " diff --git a/old/home/programs/hyfetch.nix b/old/home/programs/hyfetch.nix deleted file mode 100644 index 848bc96..0000000 --- a/old/home/programs/hyfetch.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ ... }: -{ - programs.hyfetch = { - enable = true; - - settings = { - preset = "lesbian"; - mode = "rgb"; - light_dark = "dark"; - lightness = 0.7; - color_align = { - mode = "horizontal"; - custom_colors = [ ]; - fore_back = null; - }; - backend = "neofetch"; - args = null; - distro = null; - pride_month_shown = [ ]; - pride_month_disable = false; - }; - }; -}