From f04ca9fc905ec6564936fe710801bbfe1ac5735e Mon Sep 17 00:00:00 2001 From: punkfairie Date: Fri, 15 Nov 2024 21:32:51 -0800 Subject: [PATCH] feat(home): Base appearance --- modules/home/appearance/base/default.nix | 47 ++++++++++++++++++++++++ old/home/appearance/default.nix | 20 ---------- 2 files changed, 47 insertions(+), 20 deletions(-) create mode 100644 modules/home/appearance/base/default.nix delete mode 100644 old/home/appearance/default.nix diff --git a/modules/home/appearance/base/default.nix b/modules/home/appearance/base/default.nix new file mode 100644 index 0000000..acff605 --- /dev/null +++ b/modules/home/appearance/base/default.nix @@ -0,0 +1,47 @@ +{ + lib, + config, + namespace, + pkgs, + ... +}: +let + inherit (lib) mkIf; + inherit (lib.${namespace}) mkEnableModule enabled; + + cfg = config.${namespace}.appearance; + inherit (config.${namespace}) theme; +in +{ + options = mkEnableModule "appearance"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + maple-mono-NF + ]; + + ${theme.colors.base}.pointerCursor = enabled; + + ${namespace}.theme = { + default = "dark"; + + dark = { + base = "rose-pine"; + flavor = "main"; + }; + + light = { + base = "rose-pine"; + flavor = "dawn"; + }; + }; + + ${namespace}.theme.icons = { + package = pkgs.kora-icon-theme; + name = "kora"; + }; + + # TODO: package font with harfbuzz features. + fonts.fontconfig.defaultFonts.monospace = [ "Maple Mono NF" ]; + }; +} diff --git a/old/home/appearance/default.nix b/old/home/appearance/default.nix deleted file mode 100644 index bac522c..0000000 --- a/old/home/appearance/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ - maple-mono-NF - ]; - - rose-pine.pointerCursor.enable = true; - - home.iconTheme = { - package = pkgs.kora-icon-theme; - name = "kora"; - }; - - fonts.fontconfig.defaultFonts.monospace = [ "Maple Mono NF" ]; - - imports = [ - ./gtk.nix - ./qt.nix - ]; -}