refactor(home): Remove color options from marleyos.theme

This commit is contained in:
punkfairie 2025-01-12 15:29:50 -08:00
parent b24720d921
commit f06c243d43
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
22 changed files with 376 additions and 482 deletions

View file

@ -21,6 +21,10 @@
marleyvim.overlays.default marleyvim.overlays.default
]; ];
systems.modules.nixos = with inputs; [
rose-pine.nixosModules.rose-pine
];
systems.modules.darwin = with inputs; [ systems.modules.darwin = with inputs; [
lix.nixosModules.default lix.nixosModules.default
]; ];

View file

@ -5,41 +5,22 @@
... ...
}: let }: let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.marleyos.appearance.base; cfg = config.marleyos.appearance.base;
inherit (config.marleyos.theme) colors;
inherit (config.marleyos) isDesktop; inherit (config.marleyos) isDesktop;
in { in {
options.marleyos.appearance.base.enable = mkEnableOption "base"; options.marleyos.appearance.base.enable = mkEnableOption "base";
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ rose-pine = {
# TODO: package font with harfbuzz features. enable = true;
maple-mono-NF
dm-sans
eb-garamond
whatsapp-emoji-font
];
rose-pine.pointerCursor = mkIf colors.isRosePine enabled;
marleyos = {
theme = {
colors = {
default = "dark";
dark = {
base = "rose-pine";
flavor = "main"; flavor = "main";
}; };
light = { rose-pine.pointerCursor.enable = mkIf config.rose-pine.enable true;
base = "rose-pine";
flavor = "dawn";
};
};
marleyos = {
theme = {
icons = { icons = {
package = pkgs.kora-icon-theme; package = pkgs.kora-icon-theme;
name = "kora"; name = "kora";
@ -49,6 +30,7 @@ in {
monospace = { monospace = {
package = pkgs.maple-mono-NF; package = pkgs.maple-mono-NF;
name = "Maple Mono NF"; name = "Maple Mono NF";
# TODO: package font with harfbuzz features.
ligatures = [ ligatures = [
"cv02" "cv02"
"ss01" "ss01"

View file

@ -7,7 +7,6 @@
inherit (lib.marleyos) enabled; inherit (lib.marleyos) enabled;
cfg = config.marleyos.appearance.gtk; cfg = config.marleyos.appearance.gtk;
inherit (config.marleyos.theme) colors;
in { in {
options.marleyos.appearance.gtk.enable = mkEnableOption "gtk"; options.marleyos.appearance.gtk.enable = mkEnableOption "gtk";
@ -17,7 +16,7 @@ in {
gtk = { gtk = {
enable = true; enable = true;
rose-pine = mkIf colors.isRosePine enabled; rose-pine = mkIf config.rose-pine.enable enabled;
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
}; };

View file

@ -3,18 +3,15 @@
config, config,
inputs, inputs,
... ...
}: }: let
let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
cfg = config.marleyos.appearance.qt; cfg = config.marleyos.appearance.qt;
inherit (config.marleyos.theme) colors; in {
in
{
options.marleyos.appearance.qt.enable = mkEnableOption "qt"; options.marleyos.appearance.qt.enable = mkEnableOption "qt";
config = mkIf cfg.enable { config = mkIf cfg.enable {
xdg.configFile = mkIf (colors.base == "rose-pine") { xdg.configFile = mkIf config.rose-pine.enable {
"qt5ct/colors/rose-pine.conf" = { "qt5ct/colors/rose-pine.conf" = {
source = "${inputs.rose-pine-qt5ct}/rose-pine.conf"; source = "${inputs.rose-pine-qt5ct}/rose-pine.conf";
}; };

View file

@ -9,48 +9,6 @@
cfg = config.marleyos.theme; cfg = config.marleyos.theme;
colorThemes = lib.types.enum [
"rose-pine"
];
colorThemeType = lib.types.submodule {
options = {
base = lib.mkOption {
type = colorThemes;
example = "rose-pine";
description = lib.literalMD ''
The color theme to use. This should match the base of the enable
options provided by the input's module. For instance, the rose-pine
home-manager module provides the {option}`rose-pine.enable` base
option and the {option}`programs.gtk.rose-pine.enable` option.
'';
};
flavor = lib.mkOption {
type = with lib.types; nullOr str;
default = null;
example = "moon";
description = "The theme flavor to use, if applicable.";
};
accent = lib.mkOption {
type = with lib.types; nullOr str;
default = null;
example = "rose";
description = "The theme accent to use, if applicable.";
};
};
};
mkColorThemeOpt = mode: flavor: (lib.mkOption {
type = with lib.types; either str colorThemeType;
default = {
base = "rose-pine";
inherit flavor;
};
description = "The color theme to use in ${mode} mode.";
});
# https://github.com/nix-community/home-manager/blob/master/modules/misc/gtk.nix # https://github.com/nix-community/home-manager/blob/master/modules/misc/gtk.nix
iconThemeType = lib.types.submodule { iconThemeType = lib.types.submodule {
options = { options = {
@ -100,31 +58,6 @@
}); });
in { in {
options.marleyos.theme = { options.marleyos.theme = {
colors = {
default = lib.mkOption {
type = with lib.types; str;
default = "dark";
description = "Whether to prefer the light or dark theme.";
};
light = mkColorThemeOpt "light" "dawn";
dark = mkColorThemeOpt "dark" "main";
base = lib.mkOption {
type = colorThemes;
};
flavor = lib.mkOption {
type = with lib.types; nullOr str;
};
accent = lib.mkOption {
type = with lib.types; nullOr str;
};
isRosePine = lib.mkOption {
type = with lib.types; bool;
};
};
icons = lib.mkOption { icons = lib.mkOption {
type = with lib.types; nullOr iconThemeType; type = with lib.types; nullOr iconThemeType;
default = null; default = null;
@ -166,18 +99,6 @@ in {
}; };
config = lib.mkMerge [ config = lib.mkMerge [
# colors
{
marleyos.theme.colors = rec {
inherit (cfg.colors."${cfg.colors.default}") base;
inherit (cfg.colors."${cfg.colors.default}") flavor;
inherit (cfg.colors."${cfg.colors.default}") accent;
# HACK: Need to come up with a better solution
isRosePine = base == "rose-pine";
};
}
# icons # icons
(lib.mkIf ((cfg.icons != null) && (is-linux system)) { (lib.mkIf ((cfg.icons != null) && (is-linux system)) {
gtk = lib.mkDefault { gtk = lib.mkDefault {

View file

@ -4,20 +4,20 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: }: let
let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
cfg = config.marleyos.programs.amfora; cfg = config.marleyos.programs.amfora;
inherit (config.marleyos.theme) colors;
theme =
if config.rose-pine.enable
then "rose-pine"
else "";
themeFiles = { themeFiles = {
rose-pine = "${inputs.rose-pine-amfora}/themes/rose-pine.toml"; rose-pine = "${inputs.rose-pine-amfora}/themes/rose-pine.toml";
}; };
themeFile = themeFiles."${theme}";
themeFile = themeFiles."${colors.base}"; in {
in
{
options.marleyos.programs.amfora.enable = mkEnableOption "amfora"; options.marleyos.programs.amfora.enable = mkEnableOption "amfora";
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -25,12 +25,13 @@ in
amfora amfora
]; ];
xdg.configFile."amfora/theme.toml".source = "${themeFile}"; xdg.configFile."amfora/theme.toml".source = themeFile;
# https://github.com/makeworld-the-better-one/amfora/blob/master/default-config.toml # https://github.com/makeworld-the-better-one/amfora/blob/master/default-config.toml
# Amfora requires a number of options to run - omitting everything I didn't # Amfora requires a number of options to run - omitting everything I didn't
# care to customize resulted in go panic errors. # care to customize resulted in go panic errors.
xdg.configFile."amfora/config.toml".text = # toml xdg.configFile."amfora/config.toml".text =
# toml
'' ''
include = "./theme.toml" include = "./theme.toml"
@ -53,7 +54,7 @@ in
underline = true underline = true
# }}} # }}}
highlight_style = "${colors.base}" highlight_style = "${theme}"
# Defaults {{{ # Defaults {{{
[auth] [auth]

View file

@ -3,15 +3,11 @@
config, config,
pkgs, pkgs,
... ...
}: }: let
let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.marleyos.programs.bat; cfg = config.marleyos.programs.bat;
inherit (config.marleyos.theme) colors; in {
in
{
options.marleyos.programs.bat.enable = mkEnableOption "bat"; options.marleyos.programs.bat.enable = mkEnableOption "bat";
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -23,8 +19,6 @@ in
batman batman
]; ];
rose-pine = mkIf colors.isRosePine enabled;
config = { config = {
style = "auto"; style = "auto";
}; };
@ -38,13 +32,15 @@ in
functions = { functions = {
cat = { cat = {
wraps = "bat"; wraps = "bat";
body = # fish body =
# fish
"bat $argv"; "bat $argv";
}; };
cath = { cath = {
wraps = "bat"; wraps = "bat";
body = # fish body =
# fish
"bat --plain --language=help $argv"; "bat --plain --language=help $argv";
}; };
}; };
@ -54,25 +50,29 @@ in
B = { B = {
position = "anywhere"; position = "anywhere";
setCursor = true; setCursor = true;
expansion = # fish expansion =
# fish
"% | bat"; "% | bat";
}; };
"-h" = { "-h" = {
position = "anywhere"; position = "anywhere";
expansion = # fish expansion =
# fish
"-h | cath"; "-h | cath";
}; };
"--help" = { "--help" = {
position = "anywhere"; position = "anywhere";
expansion = # fish expansion =
# fish
"--help | cath"; "--help | cath";
}; };
help = { help = {
position = "anywhere"; position = "anywhere";
expansion = # fish expansion =
# fish
"help | cath"; "help | cath";
}; };
}; };

View file

@ -2,23 +2,17 @@
lib, lib,
config, config,
... ...
}: }: let
let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.marleyos.programs.btop; cfg = config.marleyos.programs.btop;
inherit (config.marleyos.theme) colors; in {
in
{
options.marleyos.programs.btop.enable = mkEnableOption "btop"; options.marleyos.programs.btop.enable = mkEnableOption "btop";
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.btop = { programs.btop = {
enable = true; enable = true;
rose-pine = mkIf colors.isRosePine enabled;
settings = { settings = {
theme_background = false; theme_background = false;
truecolor = true; truecolor = true;

View file

@ -2,15 +2,11 @@
lib, lib,
config, config,
... ...
}: }: let
let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.marleyos.programs.cava; cfg = config.marleyos.programs.cava;
inherit (config.marleyos.theme) colors; in {
in
{
options.marleyos.programs.cava.enable = mkEnableOption "cava"; options.marleyos.programs.cava.enable = mkEnableOption "cava";
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -19,8 +15,6 @@ in
# ported to nixpkgs/unstable # ported to nixpkgs/unstable
enable = false; enable = false;
rose-pine = mkIf colors.isRosePine enabled;
# TODO: disable this when mpd is not enabled? Can that be detected on non # TODO: disable this when mpd is not enabled? Can that be detected on non
# NixOS systems? # NixOS systems?
settings = { settings = {

View file

@ -3,16 +3,13 @@
config, config,
pkgs, pkgs,
... ...
}: }: let
let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
cfg = config.marleyos.programs.cheat; cfg = config.marleyos.programs.cheat;
inherit (config.marleyos.theme) colors;
toYAML = (pkgs.formats.yaml { }).generate; toYAML = (pkgs.formats.yaml {}).generate;
in in {
{
options.marleyos.programs.cheat.enable = mkEnableOption "cheat"; options.marleyos.programs.cheat.enable = mkEnableOption "cheat";
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -22,25 +19,23 @@ in
xdg.configFile."cheat/conf.yml".source = toYAML "conf.yml" { xdg.configFile."cheat/conf.yml".source = toYAML "conf.yml" {
colorize = true; colorize = true;
style = "${colors.base}"; style = lib.mkIf config.rose-pine.enable "rose-pine";
formatter = "terminal256"; formatter = "terminal256";
pager = "less -FRX"; pager = "less -FRX";
cheatpaths = cheatpaths = let
let
cheatDir = "${config.xdg.configHome}/cheat/cheatsheets"; cheatDir = "${config.xdg.configHome}/cheat/cheatsheets";
in in [
[
{ {
name = "community"; name = "community";
path = "${cheatDir}/community"; path = "${cheatDir}/community";
tags = [ "community" ]; tags = ["community"];
readonly = true; readonly = true;
} }
{ {
name = "personal"; name = "personal";
path = "${cheatDir}/personal"; path = "${cheatDir}/personal";
tags = [ "personal" ]; tags = ["personal"];
readonly = false; readonly = false;
} }
]; ];

View file

@ -4,21 +4,16 @@
pkgs, pkgs,
system, system,
... ...
}: }: let
let
inherit (lib) mkEnableOption mkIf optionals; inherit (lib) mkEnableOption mkIf optionals;
inherit (lib.snowfall.system) is-linux is-darwin; inherit (lib.snowfall.system) is-linux is-darwin;
inherit (lib.marleyos) enabled;
cfg = config.marleyos.programs.fish; cfg = config.marleyos.programs.fish;
inherit (config.marleyos.theme) colors; in {
in
{
options.marleyos.programs.fish.enable = mkEnableOption "fish"; options.marleyos.programs.fish.enable = mkEnableOption "fish";
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = home.packages = with pkgs;
with pkgs;
[ [
# general # general
babelfish babelfish
@ -36,14 +31,12 @@ in
pax pax
] ]
# unrar-free is broken on darwin :( # unrar-free is broken on darwin :(
++ (optionals (is-linux system) [ unrar-free ]) ++ (optionals (is-linux system) [unrar-free])
++ (optionals (is-darwin system) [ unrar ]); ++ (optionals (is-darwin system) [unrar]);
programs.fish = { programs.fish = {
enable = true; enable = true;
rose-pine = mkIf colors.isRosePine enabled;
preferAbbrs = true; preferAbbrs = true;
plugins = with pkgs.fishPlugins; [ plugins = with pkgs.fishPlugins; [
@ -65,7 +58,8 @@ in
} }
]; ];
shellInit = # fish shellInit =
# fish
'' ''
set -g fish_key_bindings fish_vi_key_bindings set -g fish_key_bindings fish_vi_key_bindings
''; '';
@ -79,7 +73,8 @@ in
}; };
functions = { functions = {
fish_greeting = # fish fish_greeting =
# fish
'' ''
echo "" echo ""
figlet -f Elite " marleyOS" | lolcat figlet -f Elite " marleyOS" | lolcat
@ -87,7 +82,8 @@ in
extract = { extract = {
argumentNames = "file"; argumentNames = "file";
body = # fish body =
# fish
'' ''
set --erase argv[1] set --erase argv[1]

View file

@ -2,13 +2,10 @@
lib, lib,
config, config,
... ...
}: }: let
let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.marleyos.programs.fzf; cfg = config.marleyos.programs.fzf;
inherit (config.marleyos.theme) colors;
has-ripgrep = config.programs.ripgrep.enable; has-ripgrep = config.programs.ripgrep.enable;
has-fd = config.programs.fd.enable; has-fd = config.programs.fd.enable;
@ -17,16 +14,13 @@ let
has-tmux = config.programs.tmux.enable; has-tmux = config.programs.tmux.enable;
has-delta = config.programs.git.delta.enable; has-delta = config.programs.git.delta.enable;
has-difft = config.programs.git.difftastic.enable; has-difft = config.programs.git.difftastic.enable;
in in {
{
options.marleyos.programs.fzf.enable = mkEnableOption "fzf"; options.marleyos.programs.fzf.enable = mkEnableOption "fzf";
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.fzf = { programs.fzf = {
enable = true; enable = true;
rose-pine = mkIf colors.isRosePine enabled;
defaultOptions = [ defaultOptions = [
"--margin=10%,5%" "--margin=10%,5%"
"--border=sharp" "--border=sharp"
@ -53,15 +47,14 @@ in
}; };
home.sessionVariables = home.sessionVariables =
if has-delta then if has-delta
{ then {
fzf_diff_highlighter = "delta --paging=never --features=arctic-fox"; fzf_diff_highlighter = "delta --paging=never --features=arctic-fox";
} }
else if has-difft then else if has-difft
{ then {
fzf_diff_highlighter = "difft --color=always"; fzf_diff_highlighter = "difft --color=always";
} }
else else {};
{ };
}; };
} }

View file

@ -2,21 +2,16 @@
lib, lib,
config, config,
... ...
}: }: let
let
inherit (lib) mkIf mkDefault concatStrings; inherit (lib) mkIf mkDefault concatStrings;
cfg = config.marleyos.programs.starship; cfg = config.marleyos.programs.starship;
inherit (config.marleyos.theme) colors; in {
in config = mkIf (cfg.enable && config.rose-pine.enable) {
{ programs.starship.settings = let
config = mkIf (cfg.enable && colors.isRosePine) {
programs.starship.settings =
let
mkFormat = t: " [](fg:overlay)[${t}]($style)[](fg:overlay) "; mkFormat = t: " [](fg:overlay)[${t}]($style)[](fg:overlay) ";
langFormat = mkFormat "$symbol$version"; langFormat = mkFormat "$symbol$version";
in in {
{
format = mkDefault (concatStrings [ format = mkDefault (concatStrings [
"$username" "$username"
"$directory" "$directory"
@ -43,7 +38,8 @@ in
# TODO: Make the palette available from rose-pine-nix. # TODO: Make the palette available from rose-pine-nix.
palettes.rose-pine = palettes.rose-pine =
if (colors.flavor == "moon") then if (config.rose-pine.flavor == "moon")
then
(mkDefault { (mkDefault {
overlay = "#393552"; overlay = "#393552";
love = "#eb6f92"; love = "#eb6f92";
@ -53,7 +49,8 @@ in
foam = "#9ccfd8"; foam = "#9ccfd8";
iris = "#c4a7e7"; iris = "#c4a7e7";
}) })
else if (colors.flavor == "dawn") then else if (config.rose-pine.flavor == "dawn")
then
(mkDefault { (mkDefault {
overlay = "#f2e9e1"; overlay = "#f2e9e1";
love = "#b4637a"; love = "#b4637a";
@ -133,12 +130,10 @@ in
use_12hr = mkDefault true; use_12hr = mkDefault true;
}; };
character = character = let
let
vim = ""; vim = "";
mkChar = sym: col: " [${sym}](fg:${col}) [󰄾](fg:foam)"; mkChar = sym: col: " [${sym}](fg:${col}) [󰄾](fg:foam)";
in in {
{
success_symbol = mkChar "" "iris"; success_symbol = mkChar "" "iris";
error_symbol = mkChar "󰋔" "love"; error_symbol = mkChar "󰋔" "love";
vimcmd_symbol = mkChar vim "rose"; vimcmd_symbol = mkChar vim "rose";

View file

@ -3,23 +3,20 @@
config, config,
pkgs, pkgs,
... ...
}: }: let
let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
cfg = config.marleyos.programs.tmux; cfg = config.marleyos.programs.tmux;
inherit (config.marleyos.theme) colors; in {
in
{
options.marleyos.programs.tmux.enable = mkEnableOption "tmux"; options.marleyos.programs.tmux.enable = mkEnableOption "tmux";
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.tmux = { programs.tmux = {
enable = true; enable = true;
rose-pine = mkIf (colors.base == "rose-pine") { rose-pine = {
enable = true; extraConfig =
extraConfig = # tmux # tmux
'' ''
set -g @rose_pine_host 'on' set -g @rose_pine_host 'on'
set -g @rose_pine_directory 'on' set -g @rose_pine_directory 'on'
@ -51,7 +48,8 @@ in
{ {
plugin = continuum; plugin = continuum;
extraConfig = # tmux extraConfig =
# tmux
'' ''
set -g @continuum-restore 'on' set -g @continuum-restore 'on'
''; '';
@ -59,7 +57,8 @@ in
{ {
plugin = tilish; plugin = tilish;
extraConfig = # tmux extraConfig =
# tmux
'' ''
# Don't enforce the layout. # Don't enforce the layout.
set -g @tilish-enforce 'none' set -g @tilish-enforce 'none'
@ -77,7 +76,8 @@ in
{ {
plugin = jump; plugin = jump;
extraConfig = # tmux extraConfig =
# tmux
'' ''
set -g @jump-key 's' set -g @jump-key 's'
''; '';
@ -85,7 +85,8 @@ in
{ {
plugin = fingers; plugin = fingers;
extraConfig = # tmux extraConfig =
# tmux
'' ''
set -g @fingers-jump-key 'f' set -g @fingers-jump-key 'f'
''; '';
@ -93,7 +94,8 @@ in
{ {
plugin = tmux-floax; plugin = tmux-floax;
extraConfig = # tmux extraConfig =
# tmux
'' ''
set -g @floax-bind 'i' set -g @floax-bind 'i'
set -g @floax-text-color 'white' set -g @floax-text-color 'white'
@ -101,7 +103,8 @@ in
} }
]; ];
extraConfig = # tmux extraConfig =
# tmux
'' ''
# Set repeat timeout so keys can be repeated without the prefix. # Set repeat timeout so keys can be repeated without the prefix.
set -g repeat-time 1000 set -g repeat-time 1000

View file

@ -8,10 +8,14 @@
inherit (lib.snowfall.system) is-darwin; inherit (lib.snowfall.system) is-darwin;
cfg = config.marleyos.programs.wezterm; cfg = config.marleyos.programs.wezterm;
inherit (config.marleyos.theme) colors;
isGenericLinux = config.targets.genericLinux.enable; isGenericLinux = config.targets.genericLinux.enable;
isNotNixOS = isGenericLinux || (is-darwin system); isNotNixOS = isGenericLinux || (is-darwin system);
theme =
if config.rose-pine.enable
then "rose-pine"
else "";
in { in {
options.marleyos.programs.wezterm.enable = lib.mkEnableOption "wezterm"; options.marleyos.programs.wezterm.enable = lib.mkEnableOption "wezterm";
@ -40,7 +44,7 @@ in {
config.enable_tab_bar = false config.enable_tab_bar = false
config.color_scheme = "${colors.base}" config.color_scheme = "${theme}"
config.font = wezterm.font_with_fallback({ config.font = wezterm.font_with_fallback({
{ {

View file

@ -2,22 +2,16 @@
lib, lib,
config, config,
... ...
}: }: let
let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
inherit (lib.marleyos) enabled;
cfg = config.marleyos.programs.zathura; cfg = config.marleyos.programs.zathura;
inherit (config.marleyos.theme) colors; in {
in
{
options.marleyos.programs.zathura.enable = mkEnableOption "zathura"; options.marleyos.programs.zathura.enable = mkEnableOption "zathura";
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.zathura = { programs.zathura = {
enable = true; enable = true;
rose-pine = mkIf colors.isRosePine enabled;
}; };
}; };
} }

View file

@ -6,9 +6,6 @@
inherit (lib.marleyos) disabled; inherit (lib.marleyos) disabled;
cfg = config.marleyos.services.dunst; cfg = config.marleyos.services.dunst;
inherit (config.marleyos.theme) colors;
isRosePine = colors.base == "rose-pine";
in { in {
options.marleyos.services.dunst.enable = lib.mkEnableOption "dunst"; options.marleyos.services.dunst.enable = lib.mkEnableOption "dunst";
@ -23,7 +20,7 @@ in {
settings = lib.mkMerge [ settings = lib.mkMerge [
### Rose Pine ### ### Rose Pine ###
(lib.mkIf isRosePine { (lib.mkIf config.rose-pine.enable {
global = { global = {
width = 400; width = 400;
offset = "20x60"; offset = "20x60";

View file

@ -5,7 +5,6 @@
... ...
}: let }: let
cfg = config.marleyos.services.waybar; cfg = config.marleyos.services.waybar;
inherit (config.marleyos.theme) colors;
in { in {
options.marleyos.services.waybar.enable = lib.mkEnableOption "waybar"; options.marleyos.services.waybar.enable = lib.mkEnableOption "waybar";
@ -13,8 +12,6 @@ in {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
rose-pine.enable = lib.mkIf colors.isRosePine true;
# https://gitlab.com/Zaney/zaneyos/-/blob/main/config/waybar.nix # https://gitlab.com/Zaney/zaneyos/-/blob/main/config/waybar.nix
settings = [ settings = [
{ {
@ -201,7 +198,7 @@ in {
transition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)"; transition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
in in
lib.concatStrings [ lib.concatStrings [
(lib.optionalString colors.isRosePine (lib.optionalString config.rose-pine.enable
#css #css
'' ''
@define-color darkOne @base; @define-color darkOne @base;

View file

@ -5,10 +5,7 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib.marleyos) enabled;
cfg = config.marleyos.wayland.hyprland; cfg = config.marleyos.wayland.hyprland;
inherit (config.marleyos.theme) colors;
in { in {
options.marleyos.wayland.hyprland = { options.marleyos.wayland.hyprland = {
enable = lib.mkEnableOption "hyprland"; enable = lib.mkEnableOption "hyprland";
@ -45,9 +42,10 @@ in {
home.pointerCursor.hyprcursor.enable = true; home.pointerCursor.hyprcursor.enable = true;
home.packages = [ home.packages =
inputs.rose-pine-hyprcursor.packages.${pkgs.system}.default lib.optional
]; config.rose-pine.enable
inputs.rose-pine-hyprcursor.packages.${pkgs.system}.default;
services.hyprpaper = { services.hyprpaper = {
enable = true; enable = true;
@ -64,8 +62,6 @@ in {
systemd.enable = true; systemd.enable = true;
xwayland.enable = true; xwayland.enable = true;
rose-pine = lib.mkIf colors.isRosePine enabled;
settings = let settings = let
numMonitors = lib.length (lib.attrNames (cfg.monitors or {})); numMonitors = lib.length (lib.attrNames (cfg.monitors or {}));
workspaces = lib.range 1 10; workspaces = lib.range 1 10;
@ -135,7 +131,7 @@ in {
"XCURSOR_SIZE,24" "XCURSOR_SIZE,24"
"HYPRCURSOR_SIZE,24" "HYPRCURSOR_SIZE,24"
] ]
++ (lib.optional colors.isRosePine "HYPRCURSOR_THEME,rose-pine-hyprcursor"); ++ (lib.optional config.rose-pine.enable "HYPRCURSOR_THEME,rose-pine-hyprcursor");
workspace = workspace =
lib.mkIf (cfg ? monitors) lib.mkIf (cfg ? monitors)
@ -143,8 +139,8 @@ in {
(ws: "${toString ws}, monitor:${wsMons."${toString ws}"}") (ws: "${toString ws}, monitor:${wsMons."${toString ws}"}")
workspaces); workspaces);
"$main" = lib.mkIf colors.isRosePine "$love"; "$main" = lib.mkIf config.rose-pine.enable "$love";
"$inactive" = lib.mkIf colors.isRosePine "$muted"; "$inactive" = lib.mkIf config.rose-pine.enable "$muted";
general = { general = {
gaps_in = 5; gaps_in = 5;
@ -153,7 +149,7 @@ in {
"col.inactive_border" = "$inactive"; "col.inactive_border" = "$inactive";
"col.active_border" = "col.active_border" =
lib.mkIf colors.isRosePine "$rose $pine $love $iris 90deg"; lib.mkIf config.rose-pine.enable "$rose $pine $love $iris 90deg";
resize_on_border = false; resize_on_border = false;

View file

@ -0,0 +1,16 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.appearance.base;
in {
options.marleyos.appearance.base.enable = lib.mkEnableOption "base";
config = lib.mkIf cfg.enable {
rose-pine = {
enable = true;
flavor = "main";
};
};
}

View file

@ -0,0 +1,13 @@
{
lib,
config,
...
}: let
cfg = config.marleyos.appearance.console;
in {
options.marleyos.appearance.console.enable = lib.mkEnableOption "console";
config = lib.mkIf cfg.enable {
console.rose-pine.enable = lib.mkIf config.rose-pine.enable true;
};
}

View file

@ -10,11 +10,14 @@ in {
marleyos = { marleyos = {
hasNvidia = true; hasNvidia = true;
mounts.babeshare = enabled; mounts.babeshare = enabled;
wayland.hyprland = enabled; wayland.hyprland = enabled;
appearance = {
base = enabled;
console = enabled;
};
programs = { programs = {
fish = enabled; fish = enabled;
}; };