treewide: replace builtins.toString with toString (#1657)

Link: https://github.com/nix-community/stylix/pull/1657

Reviewed-by: awwpotato <awwpotato@voidq.com>
This commit is contained in:
NAHO 2025-07-09 17:01:21 +02:00 committed by GitHub
parent 82a1f36f80
commit 7b9a528d6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 13 additions and 13 deletions

View file

@ -66,7 +66,7 @@
]) { inherit old new; };
names = builtins.mapAttrs (_: lib.showAttrPath) paths // {
until = lib.pipe until [
builtins.toString
toString
(builtins.match "([[:digit:]]{2})([[:digit:]]{2})")
(lib.concatStringsSep ".")
];

View file

@ -31,7 +31,7 @@ mkTarget {
programs.bemenu.settings = {
# Font name
fn = "${fonts.sansSerif.name} ${
lib.optionalString (cfg.fontSize != null) (builtins.toString cfg.fontSize)
lib.optionalString (cfg.fontSize != null) (toString cfg.fontSize)
}";
};
}

View file

@ -3,7 +3,7 @@ let
host = "127.0.0.1";
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies.OverrideFirstRunPage = "http://${host}:${builtins.toString port}";
extraPolicies.OverrideFirstRunPage = "http://${host}:${toString port}";
};
port = 1234;

View file

@ -3,7 +3,7 @@ let
host = "127.0.0.1";
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
extraPolicies.OverrideFirstRunPage = "http://${host}:${builtins.toString port}";
extraPolicies.OverrideFirstRunPage = "http://${host}:${toString port}";
};
port = 1234;

View file

@ -28,7 +28,7 @@
programs.neovim =
let
cfg = config.stylix.targets.neovim;
transparencyCfg = builtins.toString (
transparencyCfg = toString (
lib.optional cfg.transparentBackground.main ''
vim.cmd.highlight({ "Normal", "guibg=NONE", "ctermbg=NONE" })
vim.cmd.highlight({ "NonText", "guibg=NONE", "ctermbg=NONE" })

View file

@ -24,7 +24,7 @@ mkTarget {
in
mkLiteral "rgba ( ${r}, ${g}, ${b}, ${opacity'} % )";
mkRgb = mkRgba "100";
rofiOpacity = builtins.toString (builtins.ceil (opacity.popups * 100));
rofiOpacity = toString (builtins.ceil (opacity.popups * 100));
in
{
programs.rofi.theme = {

View file

@ -10,7 +10,7 @@ mkTarget {
services.swaync.style = ''
* {
font-family: "${fonts.sansSerif.name}";
font-size: ${builtins.toString fonts.sizes.desktop}pt;
font-size: ${toString fonts.sizes.desktop}pt;
}
'';
}

View file

@ -57,7 +57,7 @@ mkTarget {
(
{ opacity, _colors }:
{
stylix.targets.waybar.background = "alpha(@base00, ${builtins.toString opacity.desktop})";
stylix.targets.waybar.background = "alpha(@base00, ${toString opacity.desktop})";
}
)
(
@ -66,7 +66,7 @@ mkTarget {
programs.waybar.style = ''
* {
font-family: "${fonts.${cfg.font}.name}";
font-size: ${builtins.toString fonts.sizes.desktop}pt;
font-size: ${toString fonts.sizes.desktop}pt;
}
'';
}

View file

@ -130,15 +130,15 @@ mkTarget {
"${fonts.monospace.name}",
"${fonts.emoji.name}",
},
font_size = ${builtins.toString fonts.sizes.terminal},
command_palette_font_size = ${builtins.toString fonts.sizes.popups},
font_size = ${toString fonts.sizes.terminal},
command_palette_font_size = ${toString fonts.sizes.popups},
'';
}
)
(
{ opacity }:
{
stylix.targets.wezterm.luaBody = "window_background_opacity = ${builtins.toString opacity.terminal},";
stylix.targets.wezterm.luaBody = "window_background_opacity = ${toString opacity.terminal},";
}
)
(

View file

@ -15,7 +15,7 @@ mkTarget {
''rgb(${getColorCh color "r"}, ${getColorCh color "g"}, ${getColorCh color "b"})'';
rgba =
color: alpha:
''rgba(${getColorCh color "r"}, ${getColorCh color "g"}, ${getColorCh color "b"}, ${builtins.toString alpha})'';
''rgba(${getColorCh color "r"}, ${getColorCh color "g"}, ${getColorCh color "b"}, ${toString alpha})'';
in
{
# Taken from here: