Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions modules/programs/vivid.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ let
yamlFormat = pkgs.formats.yaml { };
in
{
meta.maintainers = with lib.hm.maintainers; [ aguirre-matteo ];
meta.maintainers = [
lib.hm.maintainers.aguirre-matteo
lib.maintainers.arunoruto
];

options.programs.vivid = {
enable = mkEnableOption "vivid";
Expand All @@ -34,7 +37,14 @@ in
enableFishIntegration = mkFishIntegrationOption { inherit config; };

colorMode = mkOption {
type = with types; nullOr str;
type =
with types;
nullOr (
either str (enum [
"8-bit"
"24-bit"
])
);
default = null;
example = "8-bit";
description = ''
Expand Down Expand Up @@ -135,7 +145,7 @@ in
// (lib.mapAttrs' (
name: value:
lib.nameValuePair "vivid/themes/${name}.yml" {
source = if lib.isAttrs value then yamlFormat.generate "${name}.yml" value else value;
source = if lib.isAttrs value then pkgs.writeText "${name}.json" (builtins.toJSON value) else value;
}
) cfg.themes);

Expand Down
10 changes: 1 addition & 9 deletions tests/modules/programs/vivid/themes/tiny.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
colors:
primary: 00aaff
secondary: ff00aa
core:
directory:
foreground: primary
executable-file:
font-style: bold
foreground: secondary
{"colors":{"primary":"00aaff","secondary":"ff00aa"},"core":{"directory":{"foreground":"primary"},"executable-file":{"font-style":"bold","foreground":"secondary"}}}