halloy: use upstream themes option (#1259)

Link: https://github.com/danth/stylix/pull/1259

Reviewed-by: Oliver Jõgar <me@treier.xyz>
This commit is contained in:
awwpotato 2025-05-14 09:29:23 -07:00 committed by GitHub
parent 1466793570
commit 5d28886e94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 69 additions and 65 deletions

6
flake.lock generated
View file

@ -224,11 +224,11 @@
]
},
"locked": {
"lastModified": 1747021744,
"narHash": "sha256-IDsM/9/tHQBlhG3tXI2fTM84AUN1uRa7JDPT1LMlGes=",
"lastModified": 1747081732,
"narHash": "sha256-VnR33UmH0KzvTuVg+6oYkDVpnPuHanQisNUXytCRBPQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fb061f555f821fe4fb49f8f6f2a0cc3d5728bd52",
"rev": "f0a7db5ec1d369721e770a45e4d19f8e48186a69",
"type": "github"
},
"original": {

View file

@ -1,18 +1,61 @@
{ config, lib, ... }:
let
themeFile = config.lib.stylix.colors {
template = ./template.toml.mustache;
extension = ".toml";
};
in
{
options.stylix.targets.halloy.enable =
config.lib.stylix.mkEnableTarget "Halloy" true;
config =
config.programs.halloy =
lib.mkIf (config.stylix.enable && config.stylix.targets.halloy.enable)
{
xdg.configFile."halloy/themes/Stylix.toml".source = themeFile;
settings.theme = "stylix";
themes.stylix = with config.lib.stylix.colors.withHashtag; {
general = {
background = base00;
border = base07;
horizontal_rule = base02;
unread_indicator = base0A;
};
text = {
primary = base05;
secondary = base04;
tertiary = base0A;
success = base0B;
error = base08;
};
buffer = {
action = base0B;
background = base00;
background_text_input = base01;
background_title_bar = base01;
border = base03;
border_selected = base07;
code = base0E;
highlight = base01;
nickname = base0C;
selection = base02;
timestamp = base05;
topic = base04;
url = base0D;
server_messages = {
join = base0B;
part = base08;
quit = base08;
default = base0C;
};
};
buttons = {
primary = {
background = base00;
background_hover = base02;
background_selected = base03;
background_selected_hover = base04;
};
secondary = {
background = base01;
background_hover = base02;
background_selected = base03;
background_selected_hover = base04;
};
};
};
};
}

View file

@ -1,51 +0,0 @@
## Base16 {{scheme-name}}
# Author: {{scheme-author}}
# Generated by Stylix
# Copyright (c) 2024 Calvin Lee
# Original template from https://github.com/4e554c4c/base16-halloy
[general]
background = "#{{base00-hex}}"
border = "#{{base07-hex}}"
horizontal_rule = "#{{base02-hex}}"
unread_indicator = "#{{base0A-hex}}"
[text]
primary = "#{{base05-hex}}"
secondary = "#{{base04-hex}}"
tertiary = "#{{base0A-hex}}"
success = "#{{base0B-hex}}"
error = "#{{base08-hex}}"
[buffer]
action = "#{{base0B-hex}}"
background = "#{{base00-hex}}"
background_text_input = "#{{base01-hex}}"
background_title_bar = "#{{base01-hex}}"
border = "#{{base03-hex}}"
border_selected = "#{{base07-hex}}"
code = "#{{base0E-hex}}"
highlight = "#{{base01-hex}}"
nickname = "#{{base0C-hex}}"
selection = "#{{base02-hex}}"
timestamp = "#{{base05-hex}}"
topic = "#{{base04-hex}}"
url = "#{{base0D-hex}}"
[buffer.server_messages]
join = "#{{base0B-hex}}"
part = "#{{base08-hex}}"
quit = "#{{base08-hex}}"
default = "#{{base0C-hex}}"
[buttons.primary]
background = "#{{base00-hex}}"
background_hover = "#{{base02-hex}}"
background_selected = "#{{base03-hex}}"
background_selected_hover = "#{{base04-hex}}"
[buttons.secondary]
background = "#{{base01-hex}}"
background_hover = "#{{base02-hex}}"
background_selected = "#{{base03-hex}}"
background_selected_hover = "#{{base04-hex}}"

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:
let
package = pkgs.halloy;
@ -9,5 +9,17 @@ in
inherit package;
};
environment.systemPackages = [ package ];
home-manager.sharedModules = lib.singleton {
programs.halloy = {
enable = true;
inherit package;
settings = {
servers.liberachat = {
nickname = "stylix-testbed";
server = "irc.libera.chat";
channels = [ "#halloy" ];
};
};
};
};
}