From 1248588f9deb7ecb2dce59ff3f9073c540e23f78 Mon Sep 17 00:00:00 2001 From: arunoruto Date: Sun, 13 Oct 2024 22:51:47 +0200 Subject: [PATCH] Move stylix to theming --- modules/home-manager/home.nix | 2 +- .../home-manager/pc/desktop/gnome/theming.nix | 15 +----------- modules/home-manager/theming/default.nix | 8 +++++++ modules/home-manager/theming/icons.nix | 24 +++++++++++++++++++ modules/home-manager/{ => theming}/stylix.nix | 0 5 files changed, 34 insertions(+), 15 deletions(-) create mode 100644 modules/home-manager/theming/default.nix create mode 100644 modules/home-manager/theming/icons.nix rename modules/home-manager/{ => theming}/stylix.nix (100%) diff --git a/modules/home-manager/home.nix b/modules/home-manager/home.nix index 605c2ba..bb27ebe 100644 --- a/modules/home-manager/home.nix +++ b/modules/home-manager/home.nix @@ -12,9 +12,9 @@ in { imports = [ ./hosts ./pc + ./theming ./environment.nix ./imports.nix - ./stylix.nix ./module.nix ]; diff --git a/modules/home-manager/pc/desktop/gnome/theming.nix b/modules/home-manager/pc/desktop/gnome/theming.nix index ab30efa..e0334ae 100644 --- a/modules/home-manager/pc/desktop/gnome/theming.nix +++ b/modules/home-manager/pc/desktop/gnome/theming.nix @@ -1,16 +1,8 @@ { - pkgs, lib, config, ... -}: let - candy-icons = pkgs.fetchFromGitHub { - owner = "EliverLara"; - repo = "candy-icons"; - rev = "b92b133d0ad7ed5b5e376bd00216a05652277209"; - sha256 = "sha256-0wsSjK8WrwM/yh40a76cYblbv52tdJGTKAdxNU43frc="; - }; -in { +}: { options.gnome.theming.enable = lib.mkEnableOption "Set GNOME theming through nix (only icons)"; config = lib.mkIf config.gnome.theming.enable { @@ -25,10 +17,5 @@ in { # package = pkgs.catppuccin-cursors.macchiatoDark; # }; }; - - home.file.".local/share/icons/candy-icons" = { - # recursive = true; - source = "${candy-icons}"; - }; }; } diff --git a/modules/home-manager/theming/default.nix b/modules/home-manager/theming/default.nix new file mode 100644 index 0000000..dda2ef7 --- /dev/null +++ b/modules/home-manager/theming/default.nix @@ -0,0 +1,8 @@ +{lib, ...}: { + imports = [ + ./icons.nix + ./stylix.nix + ]; + + theming.icons.enable = lib.mkDefault true; +} diff --git a/modules/home-manager/theming/icons.nix b/modules/home-manager/theming/icons.nix new file mode 100644 index 0000000..346fdce --- /dev/null +++ b/modules/home-manager/theming/icons.nix @@ -0,0 +1,24 @@ +{ + pkgs, + lib, + config, + ... +}: let + candy-icons = pkgs.fetchFromGitHub { + owner = "EliverLara"; + repo = "candy-icons"; + rev = "011363a8e2bceaef7d9c6e982eb20152c6676ca9"; + sha256 = "sha256-duhMByJzLV0nM7byvpdg1Z1Uw59OEaZ96UezTyfuXzg="; + }; +in { + options.theming.icons.enable = lib.mkEnableOption "Setup icons for theming"; + + config = lib.mkIf config.theming.icons.enable { + home.file = { + ".local/share/icons/candy-icons" = { + # recursive = true; + source = "${candy-icons}"; + }; + }; + }; +} diff --git a/modules/home-manager/stylix.nix b/modules/home-manager/theming/stylix.nix similarity index 100% rename from modules/home-manager/stylix.nix rename to modules/home-manager/theming/stylix.nix