parser, nix, project setup

This commit is contained in:
atagen 2024-11-26 14:48:39 +11:00
commit 947e666706
22 changed files with 651 additions and 0 deletions

31
nix/culr-module.nix Normal file
View file

@ -0,0 +1,31 @@
{
pkgs,
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption types;
cfg = config.programs.culr;
in {
options.programs.meat = {
enable = mkEnableOption "culr";
pattern = mkOption {
type = with types; nullOr str;
default = null;
description = "colourising pattern";
};
palette = mkOption {
type = with types; nullOr str;
default = null;
description = "palette to use in comma separated RGB hex eg. #0f0f0f";
};
};
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;
};
};
}