serialise nix values

This commit is contained in:
atagen 2024-12-05 14:48:38 +11:00
parent 2dfb8c9a12
commit e125fd4b6a

View File

@ -4,7 +4,7 @@
config,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption types;
inherit (lib) mkIf mkEnableOption mkOption types concatStringsSep;
cfg = config.programs.culr;
in {
options.programs.culr = {
@ -24,8 +24,8 @@ in {
config = mkIf cfg.enable {
environment.systemPackages = let inherit (pkgs) culr; in [culr];
environment.sessionVariables = {
CULR_PATTERN = mkIf (cfg.pattern != []) cfg.pattern;
CULR_PALETTE = mkIf (cfg.palette != []) cfg.palette;
CULR_PATTERN = mkIf (cfg.pattern != []) (concatStringsSep ";" cfg.pattern);
CULR_PALETTE = mkIf (cfg.palette != []) (concatStringsSep ";" cfg.palette);
};
};
}