Compare commits

..

2 Commits

Author SHA1 Message Date
henrov 8292865c60 Working on reshuffling 2026-03-19 11:56:40 +00:00
henrov 136879a22a deleted generated files 2026-03-19 11:56:39 +00:00
3 changed files with 216 additions and 224 deletions
+72 -76
View File
@@ -481,21 +481,38 @@ This sets the XDG implementation
** =generated/modules/desktop/stylix.nix= ** =generated/modules/desktop/stylix.nix=
This sets the stylix implementation This sets the stylix implementation
#+BEGIN_SRC nix :tangle generated/modules/desktop/stylix.nix :noweb tangle :mkdirp yes :eval never-html #+BEGIN_SRC nix :tangle generated/modules/desktop/stylix.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, pkgs, flakeRoot, ... }: { lib, config, pkgs, flakeRoot, ... }:
let let
username = "henrov"; # --- Program definition ---
in programName = "stylix";
{
flake.nixosModules.stylix = { config, pkgs, lib, ... }:
let # Assets (theme + wallpaper)
# --- Default stylix config --- programAssets = "${flakeRoot}/assets/system/theming/${programName}";
programFiles =
if builtins.pathExists programAssets
then builtins.readDir programAssets
else {};
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
src = "${programAssets}/${name}";
});
# Enable toggle (must match option)
enableProgram = config.enableStylix or true;
# Resolve user safely (outside mkIf)
user = config.defaultUser or "henrov";
# --- Stylix configuration (self-contained) ---
stylixCfg = { stylixCfg = {
enable = true; enable = true;
base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml";
image = "${flakeRoot}/assets/hyprland/wallpaperstuff/pictures/wall1.jpg"; base16Scheme =
"${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml";
image =
"${flakeRoot}/assets/hyprland/wallpaperstuff/pictures/wall1.jpg";
polarity = "dark"; polarity = "dark";
cursor = { cursor = {
@@ -524,29 +541,41 @@ in
}; };
in in
{ {
options.mySystem.desktop.stylix.enable = # --- Option ---
lib.mkEnableOption "Enable Stylix System Theming"; options.enableStylix =
lib.mkEnableOption "Enable Stylix system theming";
config = lib.mkIf (stylixCfg.enable or false) { # --- Config ---
config = lib.mkIf enableProgram {
# --- Desktop / wallpaper packages --- # --- Dendritic app definition ---
mySystem.apps.wallpaper = { myApps.${programName} = {
enable = true; enable = true;
packages = [ "feh" "st" ]; assetsDir = programAssets;
files = files;
inherit user;
theme = "catppuccin-mocha";
polarity = "dark";
}; };
# --- Stylix theming --- # --- Stylix theming ---
stylix = stylixCfg; stylix = stylixCfg;
# --- Home session variables --- # --- Optional: wallpaper helper (kept dendritic) ---
home-manager.users.${username}.home.sessionVariables = { myApps.wallpaper = {
enable = true;
packages = [ "feh" "st" ];
};
# --- Cursor environment variables ---
home-manager.users.${user}.home.sessionVariables = {
XCURSOR_THEME = stylixCfg.cursor.name; XCURSOR_THEME = stylixCfg.cursor.name;
XCURSOR_SIZE = toString stylixCfg.cursor.size; XCURSOR_SIZE = toString stylixCfg.cursor.size;
HYPRCURSOR_THEME = stylixCfg.cursor.name; HYPRCURSOR_THEME = stylixCfg.cursor.name;
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size; HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
}; };
}; };
};
} }
#+END_SRC #+END_SRC
@@ -1071,14 +1100,14 @@ settings = {
** =generated/modules/desktop/wayland.nix= ** =generated/modules/desktop/wayland.nix=
This file sets up wayland This file sets up wayland
#+BEGIN_SRC nix :tangle generated/modules/desktop/wayland.nix :noweb tangle :mkdirp yes :eval never-html #+BEGIN_SRC nix :tangle generated/modules/desktop/wayland.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, config, pkgs, flakeRoot, ... }: { lib, config, ... }:
let let
# --- Program definition --- # --- Program definition ---
programName = "stylix"; programName = "wayland";
# Assets (theme + wallpaper) # Assets (optional, kept for consistency with template)
programAssets = "${flakeRoot}/assets/system/theming/${programName}"; programAssets = ../../../assets/system/conf/${programName};
programFiles = programFiles =
if builtins.pathExists programAssets if builtins.pathExists programAssets
then builtins.readDir programAssets then builtins.readDir programAssets
@@ -1087,53 +1116,16 @@ let
src = "${programAssets}/${name}"; src = "${programAssets}/${name}";
}); });
# Enable toggle (must match option) # Enable toggle (must match option name)
enableProgram = config.enableStylix or true; enableProgram = config.enableWayland or true;
# Resolve user safely (outside mkIf) # Resolve user safely (outside mkIf)
user = config.defaultUser or "henrov"; user = config.defaultUser or "henrov";
# --- Stylix configuration (self-contained) ---
stylixCfg = {
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";
};
};
in in
{ {
# --- Option --- # --- Option ---
options.enableStylix = options.enableWayland =
lib.mkEnableOption "Enable Stylix system theming"; lib.mkEnableOption "Enable Wayland + portals";
# --- Config --- # --- Config ---
config = lib.mkIf enableProgram { config = lib.mkIf enableProgram {
@@ -1145,25 +1137,29 @@ in
files = files; files = files;
inherit user; inherit user;
theme = "catppuccin-mocha"; # Wayland-specific metadata
polarity = "dark"; portals = [ "hyprland" ];
}; };
# --- Stylix theming --- # --- Actual system wiring ---
stylix = stylixCfg; home-manager.users.${user} = {
# --- Optional: wallpaper helper (kept dendritic) --- xdg.portal = {
myApps.wallpaper = {
enable = true; enable = true;
packages = [ "feh" "st" ];
# pkgs is unavoidable here (real package dependency)
extraPortals = [
config.pkgs.xdg-desktop-portal-hyprland
];
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
};
}; };
# --- Cursor environment variables --- home.packages = [
home-manager.users.${user}.home.sessionVariables = { config.pkgs.uwsm
XCURSOR_THEME = stylixCfg.cursor.name; ];
XCURSOR_SIZE = toString stylixCfg.cursor.size;
HYPRCURSOR_THEME = stylixCfg.cursor.name;
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
}; };
}; };
} }
+47 -18
View File
@@ -1,18 +1,35 @@
{ lib, pkgs, flakeRoot, ... }: { lib, config, pkgs, flakeRoot, ... }:
let let
username = "henrov"; # --- Program definition ---
in programName = "stylix";
{
flake.nixosModules.stylix = { config, pkgs, lib, ... }:
let # Assets (theme + wallpaper)
# --- Default stylix config --- programAssets = "${flakeRoot}/assets/system/theming/${programName}";
programFiles =
if builtins.pathExists programAssets
then builtins.readDir programAssets
else {};
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
src = "${programAssets}/${name}";
});
# Enable toggle (must match option)
enableProgram = config.enableStylix or true;
# Resolve user safely (outside mkIf)
user = config.defaultUser or "henrov";
# --- Stylix configuration (self-contained) ---
stylixCfg = { stylixCfg = {
enable = true; enable = true;
base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml";
image = "${flakeRoot}/assets/hyprland/wallpaperstuff/pictures/wall1.jpg"; base16Scheme =
"${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml";
image =
"${flakeRoot}/assets/hyprland/wallpaperstuff/pictures/wall1.jpg";
polarity = "dark"; polarity = "dark";
cursor = { cursor = {
@@ -41,27 +58,39 @@ in
}; };
in in
{ {
options.mySystem.desktop.stylix.enable = # --- Option ---
lib.mkEnableOption "Enable Stylix System Theming"; options.enableStylix =
lib.mkEnableOption "Enable Stylix system theming";
config = lib.mkIf (stylixCfg.enable or false) { # --- Config ---
config = lib.mkIf enableProgram {
# --- Desktop / wallpaper packages --- # --- Dendritic app definition ---
mySystem.apps.wallpaper = { myApps.${programName} = {
enable = true; enable = true;
packages = [ "feh" "st" ]; assetsDir = programAssets;
files = files;
inherit user;
theme = "catppuccin-mocha";
polarity = "dark";
}; };
# --- Stylix theming --- # --- Stylix theming ---
stylix = stylixCfg; stylix = stylixCfg;
# --- Home session variables --- # --- Optional: wallpaper helper (kept dendritic) ---
home-manager.users.${username}.home.sessionVariables = { myApps.wallpaper = {
enable = true;
packages = [ "feh" "st" ];
};
# --- Cursor environment variables ---
home-manager.users.${user}.home.sessionVariables = {
XCURSOR_THEME = stylixCfg.cursor.name; XCURSOR_THEME = stylixCfg.cursor.name;
XCURSOR_SIZE = toString stylixCfg.cursor.size; XCURSOR_SIZE = toString stylixCfg.cursor.size;
HYPRCURSOR_THEME = stylixCfg.cursor.name; HYPRCURSOR_THEME = stylixCfg.cursor.name;
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size; HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
}; };
}; };
};
} }
+25 -58
View File
@@ -1,11 +1,11 @@
{ lib, config, pkgs, flakeRoot, ... }: { lib, config, ... }:
let let
# --- Program definition --- # --- Program definition ---
programName = "stylix"; programName = "wayland";
# Assets (theme + wallpaper) # Assets (optional, kept for consistency with template)
programAssets = "${flakeRoot}/assets/system/theming/${programName}"; programAssets = ../../../assets/system/conf/${programName};
programFiles = programFiles =
if builtins.pathExists programAssets if builtins.pathExists programAssets
then builtins.readDir programAssets then builtins.readDir programAssets
@@ -14,53 +14,16 @@ let
src = "${programAssets}/${name}"; src = "${programAssets}/${name}";
}); });
# Enable toggle (must match option) # Enable toggle (must match option name)
enableProgram = config.enableStylix or true; enableProgram = config.enableWayland or true;
# Resolve user safely (outside mkIf) # Resolve user safely (outside mkIf)
user = config.defaultUser or "henrov"; user = config.defaultUser or "henrov";
# --- Stylix configuration (self-contained) ---
stylixCfg = {
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";
};
};
in in
{ {
# --- Option --- # --- Option ---
options.enableStylix = options.enableWayland =
lib.mkEnableOption "Enable Stylix system theming"; lib.mkEnableOption "Enable Wayland + portals";
# --- Config --- # --- Config ---
config = lib.mkIf enableProgram { config = lib.mkIf enableProgram {
@@ -72,25 +35,29 @@ in
files = files; files = files;
inherit user; inherit user;
theme = "catppuccin-mocha"; # Wayland-specific metadata
polarity = "dark"; portals = [ "hyprland" ];
}; };
# --- Stylix theming --- # --- Actual system wiring ---
stylix = stylixCfg; home-manager.users.${user} = {
# --- Optional: wallpaper helper (kept dendritic) --- xdg.portal = {
myApps.wallpaper = {
enable = true; enable = true;
packages = [ "feh" "st" ];
# pkgs is unavoidable here (real package dependency)
extraPortals = [
config.pkgs.xdg-desktop-portal-hyprland
];
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
};
}; };
# --- Cursor environment variables --- home.packages = [
home-manager.users.${user}.home.sessionVariables = { config.pkgs.uwsm
XCURSOR_THEME = stylixCfg.cursor.name; ];
XCURSOR_SIZE = toString stylixCfg.cursor.size;
HYPRCURSOR_THEME = stylixCfg.cursor.name;
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
}; };
}; };
} }