Compare commits
2 Commits
f83ffc8590
...
8292865c60
| Author | SHA1 | Date | |
|---|---|---|---|
| 8292865c60 | |||
| 136879a22a |
+108
-112
@@ -481,70 +481,99 @@ 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}";
|
||||||
stylixCfg = {
|
programFiles =
|
||||||
enable = true;
|
if builtins.pathExists programAssets
|
||||||
base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml";
|
then builtins.readDir programAssets
|
||||||
|
else {};
|
||||||
|
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
|
||||||
|
src = "${programAssets}/${name}";
|
||||||
|
});
|
||||||
|
|
||||||
image = "${flakeRoot}/assets/hyprland/wallpaperstuff/pictures/wall1.jpg";
|
# Enable toggle (must match option)
|
||||||
polarity = "dark";
|
enableProgram = config.enableStylix or true;
|
||||||
|
|
||||||
cursor = {
|
# Resolve user safely (outside mkIf)
|
||||||
package = pkgs.phinger-cursors;
|
user = config.defaultUser or "henrov";
|
||||||
name = "phinger-cursors-light";
|
|
||||||
size = 24;
|
# --- 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 = {
|
||||||
fonts = {
|
package = pkgs.lato;
|
||||||
monospace = {
|
name = "Lato";
|
||||||
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
|
|
||||||
{
|
|
||||||
options.mySystem.desktop.stylix.enable =
|
|
||||||
lib.mkEnableOption "Enable Stylix System Theming";
|
|
||||||
|
|
||||||
config = lib.mkIf (stylixCfg.enable or false) {
|
icons = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
dark = "Papirus-Dark";
|
||||||
|
light = "Papirus-Light";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# --- Option ---
|
||||||
|
options.enableStylix =
|
||||||
|
lib.mkEnableOption "Enable Stylix system theming";
|
||||||
|
|
||||||
# --- Desktop / wallpaper packages ---
|
# --- Config ---
|
||||||
mySystem.apps.wallpaper = {
|
config = lib.mkIf enableProgram {
|
||||||
enable = true;
|
|
||||||
packages = [ "feh" "st" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# --- Stylix theming ---
|
# --- Dendritic app definition ---
|
||||||
stylix = stylixCfg;
|
myApps.${programName} = {
|
||||||
|
enable = true;
|
||||||
|
assetsDir = programAssets;
|
||||||
|
files = files;
|
||||||
|
inherit user;
|
||||||
|
|
||||||
# --- Home session variables ---
|
theme = "catppuccin-mocha";
|
||||||
home-manager.users.${username}.home.sessionVariables = {
|
polarity = "dark";
|
||||||
XCURSOR_THEME = stylixCfg.cursor.name;
|
};
|
||||||
XCURSOR_SIZE = toString stylixCfg.cursor.size;
|
|
||||||
HYPRCURSOR_THEME = stylixCfg.cursor.name;
|
# --- Stylix theming ---
|
||||||
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
|
stylix = stylixCfg;
|
||||||
};
|
|
||||||
|
# --- Optional: wallpaper helper (kept dendritic) ---
|
||||||
|
myApps.wallpaper = {
|
||||||
|
enable = true;
|
||||||
|
packages = [ "feh" "st" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# --- Cursor environment variables ---
|
||||||
|
home-manager.users.${user}.home.sessionVariables = {
|
||||||
|
XCURSOR_THEME = stylixCfg.cursor.name;
|
||||||
|
XCURSOR_SIZE = toString stylixCfg.cursor.size;
|
||||||
|
HYPRCURSOR_THEME = stylixCfg.cursor.name;
|
||||||
|
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -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" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# --- Cursor environment variables ---
|
# pkgs is unavoidable here (real package dependency)
|
||||||
home-manager.users.${user}.home.sessionVariables = {
|
extraPortals = [
|
||||||
XCURSOR_THEME = stylixCfg.cursor.name;
|
config.pkgs.xdg-desktop-portal-hyprland
|
||||||
XCURSOR_SIZE = toString stylixCfg.cursor.size;
|
];
|
||||||
HYPRCURSOR_THEME = stylixCfg.cursor.name;
|
|
||||||
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
|
config.hyprland = {
|
||||||
|
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
config.pkgs.uwsm
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,67 +1,96 @@
|
|||||||
{ 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}";
|
||||||
stylixCfg = {
|
programFiles =
|
||||||
enable = true;
|
if builtins.pathExists programAssets
|
||||||
base16Scheme = "${flakeRoot}/assets/system/theming/stylix/catppuccin-mocha.yaml";
|
then builtins.readDir programAssets
|
||||||
|
else {};
|
||||||
|
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
|
||||||
|
src = "${programAssets}/${name}";
|
||||||
|
});
|
||||||
|
|
||||||
image = "${flakeRoot}/assets/hyprland/wallpaperstuff/pictures/wall1.jpg";
|
# Enable toggle (must match option)
|
||||||
polarity = "dark";
|
enableProgram = config.enableStylix or true;
|
||||||
|
|
||||||
cursor = {
|
# Resolve user safely (outside mkIf)
|
||||||
package = pkgs.phinger-cursors;
|
user = config.defaultUser or "henrov";
|
||||||
name = "phinger-cursors-light";
|
|
||||||
size = 24;
|
# --- 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 = {
|
||||||
fonts = {
|
package = pkgs.lato;
|
||||||
monospace = {
|
name = "Lato";
|
||||||
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
|
|
||||||
{
|
|
||||||
options.mySystem.desktop.stylix.enable =
|
|
||||||
lib.mkEnableOption "Enable Stylix System Theming";
|
|
||||||
|
|
||||||
config = lib.mkIf (stylixCfg.enable or false) {
|
icons = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
dark = "Papirus-Dark";
|
||||||
|
light = "Papirus-Light";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# --- Option ---
|
||||||
|
options.enableStylix =
|
||||||
|
lib.mkEnableOption "Enable Stylix system theming";
|
||||||
|
|
||||||
# --- Desktop / wallpaper packages ---
|
# --- Config ---
|
||||||
mySystem.apps.wallpaper = {
|
config = lib.mkIf enableProgram {
|
||||||
enable = true;
|
|
||||||
packages = [ "feh" "st" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# --- Stylix theming ---
|
# --- Dendritic app definition ---
|
||||||
stylix = stylixCfg;
|
myApps.${programName} = {
|
||||||
|
enable = true;
|
||||||
|
assetsDir = programAssets;
|
||||||
|
files = files;
|
||||||
|
inherit user;
|
||||||
|
|
||||||
# --- Home session variables ---
|
theme = "catppuccin-mocha";
|
||||||
home-manager.users.${username}.home.sessionVariables = {
|
polarity = "dark";
|
||||||
XCURSOR_THEME = stylixCfg.cursor.name;
|
};
|
||||||
XCURSOR_SIZE = toString stylixCfg.cursor.size;
|
|
||||||
HYPRCURSOR_THEME = stylixCfg.cursor.name;
|
# --- Stylix theming ---
|
||||||
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
|
stylix = stylixCfg;
|
||||||
};
|
|
||||||
|
# --- Optional: wallpaper helper (kept dendritic) ---
|
||||||
|
myApps.wallpaper = {
|
||||||
|
enable = true;
|
||||||
|
packages = [ "feh" "st" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# --- Cursor environment variables ---
|
||||||
|
home-manager.users.${user}.home.sessionVariables = {
|
||||||
|
XCURSOR_THEME = stylixCfg.cursor.name;
|
||||||
|
XCURSOR_SIZE = toString stylixCfg.cursor.size;
|
||||||
|
HYPRCURSOR_THEME = stylixCfg.cursor.name;
|
||||||
|
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# --- Cursor environment variables ---
|
# pkgs is unavoidable here (real package dependency)
|
||||||
home-manager.users.${user}.home.sessionVariables = {
|
extraPortals = [
|
||||||
XCURSOR_THEME = stylixCfg.cursor.name;
|
config.pkgs.xdg-desktop-portal-hyprland
|
||||||
XCURSOR_SIZE = toString stylixCfg.cursor.size;
|
];
|
||||||
HYPRCURSOR_THEME = stylixCfg.cursor.name;
|
|
||||||
HYPRCURSOR_SIZE = toString stylixCfg.cursor.size;
|
config.hyprland = {
|
||||||
|
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
config.pkgs.uwsm
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user