blob: af1e799c972324d7170aa461a7aa94a6ea578ea5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
{ lib, flake-parts-lib, inputs, ... }:
let
inherit (lib) mkOption mkPackageOption types;
inherit (flake-parts-lib) mkPerSystemOption;
in {
options.perSystem = mkPerSystemOption ({ pkgs, config, ... }: {
options = {
weznix = {
wezterm = mkPackageOption pkgs "wezterm" {};
configDirectory = mkOption {
type = types.str;
default = "~/.config/wezterm";
};
luaPath = mkOption {
type = types.path;
description = "Path to wezterm config directory";
};
wrapConfig = mkOption {
type = types.either types.bool types.str;
default = "WEZDEV";
};
extraPATH = mkOption {
type = types.listOf types.package;
default = [];
description = "Extra packages to add to wezterm's $PATH";
};
extraWrapperArgs = mkOption {
type = types.listOf types.str;
default = [];
description = "Extra arguments to pass to `wrapProgram`";
};
pass = mkOption {
type = types.lazyAttrsOf types.anything;
default = {};
description = "Anything else to pass into the lua config";
};
};
};
config = {
packages = {
weznix = pkgs.callPackage ../pkgs/weznix.nix {
inherit (config.weznix) wezterm;
nixToLua = import inputs.nixToLua;
} {
inherit (config.weznix) configDirectory luaPath wrapConfig extraPATH extraWrapperArgs pass;
};
};
};
});
}
|