From 547e41d3f93313dafb28cbb20e2d52f3f464cc54 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 29 Jun 2025 17:38:46 +0300 Subject: [PATCH] stylix: new theme Signed-off-by: unexplrd --- hosts/sarien/configuration.nix | 2 +- modules/home/desktop/niri/default.nix | 14 +++++--- modules/nixos/system/stylix/default.nix | 48 +++++++++++++++++++------ 3 files changed, 48 insertions(+), 16 deletions(-) diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index c5cd681..63f3cad 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -45,7 +45,7 @@ }; stylix = { enable = true; - theme = "gruvbox-dark-pale"; + theme = "sandcastle"; }; locale = "uk_UA.UTF-8"; misc.qmk-vial.enable = true; diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index f334fa9..63e1b55 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -51,13 +51,17 @@ in { else if config.stylix.polarity == "dark" then "Papirus-Dark" else "Papirus-Light"; - package = - if (lib.strings.hasPrefix "gruvbox" osConfig.module.stylix.theme) + package = let + inherit (osConfig.module.stylix) theme; + in + if (lib.strings.hasPrefix "gruvbox" theme) then pkgs.gruvbox-plus-icons - else if (lib.strings.hasPrefix "rose-pine" osConfig.module.stylix.theme) + else if (lib.strings.hasPrefix "rose-pine" theme) then pkgs.papirus-icon-theme.override {color = "indigo";} - else if (lib.strings.hasPrefix "nord" osConfig.module.stylix.theme) + else if (lib.strings.hasPrefix "nord" theme) then pkgs.papirus-icon-theme.override {color = "nordic";} + else if (lib.strings.hasPrefix "s" theme) + then pkgs.papirus-icon-theme.override {color = "teal";} else pkgs.papirus-icon-theme; in {inherit name package;}; }; @@ -71,7 +75,7 @@ in { waybar = import ./programs/waybar {inherit config colors getExe ifLaptop launcher pkgs;}; }; - services = import ./services {inherit pkgs lockscreen getExe perSystem;}; + services = import ./services {inherit pkgs lockscreen getExe perSystem osConfig;}; home.packages = with pkgs; [ diff --git a/modules/nixos/system/stylix/default.nix b/modules/nixos/system/stylix/default.nix index a8075e9..51e03c4 100644 --- a/modules/nixos/system/stylix/default.nix +++ b/modules/nixos/system/stylix/default.nix @@ -12,6 +12,8 @@ cfg = config.module.stylix; + fromBase16Schemes = f: "${pkgs.base16-schemes}/share/themes/${f}.yaml"; + interPackage = pkgs.inter-nerdfont; iosevkaPackage = pkgs.nerd-fonts.iosevka; iosevkaTermPackage = pkgs.nerd-fonts.iosevka-term; @@ -27,6 +29,11 @@ name = "wallhaven-p91dym.jpg"; sha256 = "wnsAhh0Soxm+lxahh+Xc/+CAw/abWgPIkeoOlzNGaDo="; }; + waves = fetchurl { + url = "https://w.wallhaven.cc/full/5y/wallhaven-5ydl93.png"; + name = "wallhaven-5ydl93.png"; + sha256 = "fTE2cyn2mkx05+Zn6qcs4+Rb7AYD0uyi6CNznuZYOjw="; + }; }; fern-outline = fetchurl { url = "https://w.wallhaven.cc/full/p9/wallhaven-p9m7ve.png"; @@ -72,7 +79,7 @@ themes = { rose-pine-dawn = { polarity = "light"; - scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-dawn.yaml"; + scheme = fromBase16Schemes "rose-pine-dawn"; wallpaper = wallpapers.cyber-dawn; serif = { @@ -93,7 +100,7 @@ }; rose-pine-moon = { polarity = "dark"; - scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-moon.yaml"; + scheme = fromBase16Schemes "rose-pine-moon"; wallpaper = wallpapers.cyber-dawn; serif = { @@ -112,9 +119,30 @@ size = 24; }; }; + sandcastle = { + polarity = "dark"; + scheme = fromBase16Schemes "sandcastle"; + wallpaper = wallpapers.abstract.waves; + + serif = { + package = iosevkaPackage; + name = "Iosevka Nerd Font"; + }; + + monospace = { + package = iosevkaTermPackage; + name = "IosevkaTerm Nerd Font Mono"; + }; + + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 24; + }; + }; gruvbox-dark-pale = { polarity = "dark"; - scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-pale.yaml"; + scheme = fromBase16Schemes "gruvbox-dark-pale"; wallpaper = wallpapers.mountains-sepia; serif = { @@ -135,7 +163,7 @@ }; nord = { polarity = "dark"; - scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml"; + scheme = fromBase16Schemes "nord"; wallpaper = fetchurl { url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png"; name = "wallhaven-l8l9gq.png"; @@ -161,7 +189,7 @@ nord-light = { polarity = "light"; - scheme = "${pkgs.base16-schemes}/share/themes/nord-light.yaml"; + scheme = fromBase16Schemes "nord-light"; wallpaper = fetchurl { url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png"; name = "wallhaven-l8l9gq.png"; @@ -187,7 +215,7 @@ helios = { polarity = "dark"; - scheme = "${pkgs.base16-schemes}/share/themes/helios.yaml"; + scheme = fromBase16Schemes "helios"; wallpaper = fetchurl { url = "https://w.wallhaven.cc/full/lq/wallhaven-lqorw2.png"; name = "wallhaven-lqorw2.png"; @@ -213,7 +241,7 @@ sulphurpool = { polarity = "dark"; - scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool.yaml"; + scheme = fromBase16Schemes "atelier-sulphurpool"; wallpaper = fetchurl { url = "https://w.wallhaven.cc/full/rd/wallhaven-rd5q3m.jpg"; name = "wallhaven-rd5q3m.jpg"; @@ -239,7 +267,7 @@ himalaya = { # lightly pink like himalayan salt polarity = "light"; - scheme = "${pkgs.base16-schemes}/share/themes/atelier-plateau-light.yaml"; + scheme = fromBase16Schemes "atelier-plateau-light"; wallpaper = wallpapers.mountains-pink; serif = { @@ -260,7 +288,7 @@ }; vesper = { polarity = "dark"; - scheme = "${pkgs.base16-schemes}/share/themes/vesper.yaml"; + scheme = fromBase16Schemes "vesper"; wallpaper = wallpapers.abstract.squares; serif = { @@ -281,7 +309,7 @@ }; github = { polarity = "light"; - scheme = "${pkgs.base16-schemes}/share/themes/github.yaml"; + scheme = fromBase16Schemes "github"; wallpaper = wallpapers.abstract.squares; serif = {