parser, nix, project setup
This commit is contained in:
commit
947e666706
22 changed files with 651 additions and 0 deletions
31
nix/culr-module.nix
Normal file
31
nix/culr-module.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue