Compare commits

...

2 Commits

Author SHA1 Message Date
henrov f83ffc8590 Working on reshuffling 2026-03-19 11:55:59 +00:00
henrov d74cffb015 deleted generated files 2026-03-19 11:55:58 +00:00
2 changed files with 120 additions and 54 deletions
+60 -27
View File
@@ -1071,14 +1071,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, ... }: { lib, config, pkgs, flakeRoot, ... }:
let let
# --- Program definition --- # --- Program definition ---
programName = "wayland"; programName = "stylix";
# Assets (optional, kept for consistency with template) # Assets (theme + wallpaper)
programAssets = ../../../assets/system/conf/${programName}; programAssets = "${flakeRoot}/assets/system/theming/${programName}";
programFiles = programFiles =
if builtins.pathExists programAssets if builtins.pathExists programAssets
then builtins.readDir programAssets then builtins.readDir programAssets
@@ -1087,16 +1087,53 @@ let
src = "${programAssets}/${name}"; src = "${programAssets}/${name}";
}); });
# Enable toggle (must match option name) # Enable toggle (must match option)
enableProgram = config.enableWayland or true; enableProgram = config.enableStylix 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.enableWayland = options.enableStylix =
lib.mkEnableOption "Enable Wayland + portals"; lib.mkEnableOption "Enable Stylix system theming";
# --- Config --- # --- Config ---
config = lib.mkIf enableProgram { config = lib.mkIf enableProgram {
@@ -1108,29 +1145,25 @@ in
files = files; files = files;
inherit user; inherit user;
# Wayland-specific metadata theme = "catppuccin-mocha";
portals = [ "hyprland" ]; polarity = "dark";
}; };
# --- Actual system wiring --- # --- Stylix theming ---
home-manager.users.${user} = { stylix = stylixCfg;
xdg.portal = { # --- Optional: wallpaper helper (kept dendritic) ---
enable = true; myApps.wallpaper = {
enable = true;
packages = [ "feh" "st" ];
};
# pkgs is unavoidable here (real package dependency) # --- Cursor environment variables ---
extraPortals = [ home-manager.users.${user}.home.sessionVariables = {
config.pkgs.xdg-desktop-portal-hyprland XCURSOR_THEME = stylixCfg.cursor.name;
]; XCURSOR_SIZE = toString stylixCfg.cursor.size;
HYPRCURSOR_THEME = stylixCfg.cursor.name;
config.hyprland = { HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
};
};
home.packages = [
config.pkgs.uwsm
];
}; };
}; };
} }
+60 -27
View File
@@ -1,11 +1,11 @@
{ lib, config, ... }: { lib, config, pkgs, flakeRoot, ... }:
let let
# --- Program definition --- # --- Program definition ---
programName = "wayland"; programName = "stylix";
# Assets (optional, kept for consistency with template) # Assets (theme + wallpaper)
programAssets = ../../../assets/system/conf/${programName}; programAssets = "${flakeRoot}/assets/system/theming/${programName}";
programFiles = programFiles =
if builtins.pathExists programAssets if builtins.pathExists programAssets
then builtins.readDir programAssets then builtins.readDir programAssets
@@ -14,16 +14,53 @@ let
src = "${programAssets}/${name}"; src = "${programAssets}/${name}";
}); });
# Enable toggle (must match option name) # Enable toggle (must match option)
enableProgram = config.enableWayland or true; enableProgram = config.enableStylix 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.enableWayland = options.enableStylix =
lib.mkEnableOption "Enable Wayland + portals"; lib.mkEnableOption "Enable Stylix system theming";
# --- Config --- # --- Config ---
config = lib.mkIf enableProgram { config = lib.mkIf enableProgram {
@@ -35,29 +72,25 @@ in
files = files; files = files;
inherit user; inherit user;
# Wayland-specific metadata theme = "catppuccin-mocha";
portals = [ "hyprland" ]; polarity = "dark";
}; };
# --- Actual system wiring --- # --- Stylix theming ---
home-manager.users.${user} = { stylix = stylixCfg;
xdg.portal = { # --- Optional: wallpaper helper (kept dendritic) ---
enable = true; myApps.wallpaper = {
enable = true;
packages = [ "feh" "st" ];
};
# pkgs is unavoidable here (real package dependency) # --- Cursor environment variables ---
extraPortals = [ home-manager.users.${user}.home.sessionVariables = {
config.pkgs.xdg-desktop-portal-hyprland XCURSOR_THEME = stylixCfg.cursor.name;
]; XCURSOR_SIZE = toString stylixCfg.cursor.size;
HYPRCURSOR_THEME = stylixCfg.cursor.name;
config.hyprland = { HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
};
};
home.packages = [
config.pkgs.uwsm
];
}; };
}; };
} }