From 43ce65fc9294c6180ddc018b7007e14509e0274b Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 16 Nov 2024 17:15:18 -0800 Subject: [PATCH] feat(home): Glow --- homes/x86_64-linux/marley@nyx/default.nix | 1 + modules/home/programs/glow/default.nix | 30 +++++++++++++++++++++++ old/home/programs/glow.nix | 16 ------------ 3 files changed, 31 insertions(+), 16 deletions(-) create mode 100644 modules/home/programs/glow/default.nix delete mode 100644 old/home/programs/glow.nix diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix index 197b704..55502ff 100644 --- a/homes/x86_64-linux/marley@nyx/default.nix +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -26,6 +26,7 @@ in fzf = enabled; gh = enabled; git = enabled; + glow = enabled; journalctl = enabled; neo = enabled; systemctl = enabled; diff --git a/modules/home/programs/glow/default.nix b/modules/home/programs/glow/default.nix new file mode 100644 index 0000000..34e681b --- /dev/null +++ b/modules/home/programs/glow/default.nix @@ -0,0 +1,30 @@ +{ + lib, + config, + namespace, + pkgs, + ... +}: +let + inherit (lib) mkIf; + inherit (lib.${namespace}) mkEnableModule; + + cfg = config.${namespace}.programs.glow; + toYAML = (pkgs.formats.yaml { }).generate; +in +{ + options = mkEnableModule "programs.glow"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + glow + ]; + + xdg.configFile."glow/glow.yml".source = toYAML "glow.yml" { + style = "pink"; + mouse = true; + pager = true; + width = 80; + }; + }; +} diff --git a/old/home/programs/glow.nix b/old/home/programs/glow.nix deleted file mode 100644 index b3e3395..0000000 --- a/old/home/programs/glow.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, ... }: -let - toYaml = (pkgs.formats.yaml { }).generate; -in -{ - home.packages = with pkgs; [ - glow - ]; - - xdg.configFile."glow/glow.yml".source = toYaml "glow.yml" { - style = "pink"; - mouse = true; - pager = true; - width = 80; - }; -}