this post was submitted on 04 Oct 2025
183 points (100.0% liked)
Programmer Humor
38817 readers
458 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I figured, I'd involuntarily sign up for counter suggestions by posting this. ๐
Using
lib.escape
is a good idea, thanks.But yeah, basically I want to configure Alacritty and I'm using the respective home-manager module.
Even more specifically, I want to pass stuff, including a regex, into the
settings
parameter, which more-or-less just takes the Nix expression that I shove in and then outputs it as TOML on disk.As for how I would've liked this to work:
''doubled single-quotes''
in Nix to not need escaping.'single-quotes'
in TOML to not need escaping: https://toml.io/en/v1.0.0#string%3A%7E%3Atext=single+quotesBut the TOML is templated with
"double-quotes"
, so I do need to escape the regex after all.I did just try to understand how the Alacritty module does the templating and found this gem:
Source
So, that doesn't fill me with a whole lot of confidence. ๐
But yeah, it's working now without me having to write a whole bunch of backslashes, so that's good enough in my book.