home-manager
home-manager copied to clipboard
alacritty: add `theme` option
Description
Add program.alacritty.theme
option, to import a theme from the alacritty-theme
repository.
I've been using something similar in my config repo for a while, it was high time I upstreamed it. ;3
Checklist
-
[x] Change is backwards compatible.
-
[x] Code formatted with
./format
. -
[x] Code tested through
nix-shell --pure tests -A run.$t
for the following tests:- alacritty-empty-settings
- alacritty-example-settings
- alacritty-merging-settings
- alacritty-toml-config
-
[ ] Test cases updated/added. See example.
-
[x] Commit messages are formatted like
{component}: {description} {long description}
See CONTRIBUTING for more information and recent commit messages for examples.
Maintainer CC
No listed maintainer or recurrent committer. @r-vdp was the last person to edit the module.
Interesting. I'm guessing the following fails to eval during the test, even though it is fine under the (pure) REPL:
with lib; with builtins; pipe pkgs.alacritty-theme [
toString
readDir
(filterAttrs (name: type: type == "regular" && hasSuffix ".toml" name))
attrNames
(map (removeSuffix ".toml"))
]
The call to toString
is superfluous, let's try removing it.
~~PS: That's not sufficient, should I just make the option accept any string?~~
PPS: It was only failing when evaluating type.description
, and a giant enum list was unhelpful anyhow, so I replaced it with a more human-friendly description.
Cool! I'm afk most of the day today, but I'll have a look tomorrow!
Cool! I'm afk most of the day today, but I'll have a look tomorrow!
Thanks a lot, and don't worry this is not urgent at all :) I'll go and squash all the fixup commits before then.
PS: Squashed things a bit more, as it didn't make sense to leave commits where the option isn't compatible with nixpkgs 23.11
Rebased to deal with merge conflict.
@r-vdp, do you still want to review this?
PS: Sorry for the rebase & pfusch noise, I forgot to reformat things after fixing a small issue.
Can this be merged, given that someone else also tested it?
@rycee any chance of getting this merged?