From 9d63a7a80b9b80bd494aaa77d26b8297aa90a820 Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Wed, 18 Mar 2026 15:46:02 +0000 Subject: [PATCH] New structure since I kept struggling with the home-manager implemnentation --- Droidnix/README.org | 67 ++++++++++++++----- Droidnix/generated/modules/desktop/stylix.nix | 58 ++++++++++++++++ 2 files changed, 109 insertions(+), 16 deletions(-) create mode 100644 Droidnix/generated/modules/desktop/stylix.nix diff --git a/Droidnix/README.org b/Droidnix/README.org index 2579b6b74..718ae5ac6 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -499,30 +499,65 @@ This sets the XDG implementation } #+END_SRC -** =generated/modules/system/stylix.nix= +** =generated/modules/desktop/stylix.nix= This sets the stylix implementation -#+BEGIN_SRC nix :tangle generated/modules/system/stylix.nix :noweb tangle :mkdirp yes :eval never-html -{ config, pkgs, inputs, flakeRoot, ... }: +#+BEGIN_SRC nix :tangle generated/modules/desktop/stylix.nix :noweb tangle :mkdirp yes :eval never-html +{flakeRoot, ... }: -let - _ = builtins.trace ("Stylix enable = " + toString config.stylix.enable) null; -in { - imports = [ - inputs.stylix.nixosModules.stylix - ]; + flake.nixosModules.stylix = { inputs, config, lib, pkgs, ... }: + let + cfg = config.mySystem.desktop.stylix; + in { - environment.systemPackages = with pkgs; [ + environment.systemPackages = with pkgs; [ feh # wallpaper target - #gtk3 # GTK target - # gtk4 # GTK target st # NVF / terminal target, or kitty ]; - stylix = { - enable = true; - base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml"; - polarity = "dark"; + options.mySystem.desktop.stylix.enable = lib.mkEnableOption "Stylix System Theming"; + + config = lib.mkIf cfg.enable { + stylix = { + enable = true; + base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml"; + + image = "${flakeRoot}/assets/hyprland/wallpaperstuff/pictures/wall1.jpg"; + polarity = "dark"; + + cursor = { + package = pkgs.phinger-cursors; + name = "phinger-cursors-light"; + size = 24; + }; + + fonts = { + monospace = { + package = pkgs.nerd-fonts.fira-code; + name = "Fira Code Nerd Font"; + }; + + sansSerif = { + package = pkgs.lato; + name = "Lato"; + }; + }; + + icons = { + enable = true; + package = pkgs.papirus-icon-theme; + dark = "Papirus-Dark"; + light = "Papirus-Light"; + }; + }; + + home-manager.users.henrov.home.sessionVariables = { + XCURSOR_THEME = config.stylix.cursor.name; + XCURSOR_SIZE = toString config.stylix.cursor.size; + HYPRCURSOR_THEME = config.stylix.cursor.name; + HYPRCURSOR_SIZE = toString config.stylix.cursor.size; + }; + }; }; } #+END_SRC diff --git a/Droidnix/generated/modules/desktop/stylix.nix b/Droidnix/generated/modules/desktop/stylix.nix new file mode 100644 index 000000000..13e31dfa3 --- /dev/null +++ b/Droidnix/generated/modules/desktop/stylix.nix @@ -0,0 +1,58 @@ +{flakeRoot, ... }: + +{ + flake.nixosModules.stylix = { inputs, config, lib, pkgs, ... }: + let + cfg = config.mySystem.desktop.stylix; + in { + + environment.systemPackages = with pkgs; [ + feh # wallpaper target + st # NVF / terminal target, or kitty + ]; + + options.mySystem.desktop.stylix.enable = lib.mkEnableOption "Stylix System Theming"; + + config = lib.mkIf cfg.enable { + stylix = { + enable = true; + base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml"; + + image = "${flakeRoot}/assets/hyprland/wallpaperstuff/pictures/wall1.jpg"; + polarity = "dark"; + + cursor = { + package = pkgs.phinger-cursors; + name = "phinger-cursors-light"; + size = 24; + }; + + fonts = { + monospace = { + package = pkgs.nerd-fonts.fira-code; + name = "Fira Code Nerd Font"; + }; + + sansSerif = { + package = pkgs.lato; + name = "Lato"; + }; + }; + + icons = { + enable = true; + package = pkgs.papirus-icon-theme; + dark = "Papirus-Dark"; + light = "Papirus-Light"; + }; + }; + + home-manager.users.henrov.home.sessionVariables = { + XCURSOR_THEME = config.stylix.cursor.name; + XCURSOR_SIZE = toString config.stylix.cursor.size; + HYPRCURSOR_THEME = config.stylix.cursor.name; + HYPRCURSOR_SIZE = toString config.stylix.cursor.size; + }; + }; + }; +}