mirror of
https://git.gay/xqtc/nixos-config
synced 2024-11-22 22:10:32 +01:00
36 lines
577 B
Nix
36 lines
577 B
Nix
|
{
|
||
|
config,
|
||
|
pkgs,
|
||
|
lib,
|
||
|
dwl-source,
|
||
|
...
|
||
|
}:
|
||
|
with lib; let
|
||
|
cfg = config.programs.dwl;
|
||
|
dwlPackage = import ../packages/dwl.nix {
|
||
|
inherit pkgs;
|
||
|
inherit (cfg) patches cmd;
|
||
|
inherit dwl-source;
|
||
|
};
|
||
|
in {
|
||
|
options.programs.dwl = {
|
||
|
enable = mkEnableOption "dwl";
|
||
|
package = mkOption {
|
||
|
type = types.package;
|
||
|
default = dwlPackage;
|
||
|
};
|
||
|
patches = mkOption {
|
||
|
default = [];
|
||
|
};
|
||
|
cmd = {
|
||
|
terminal = mkOption {
|
||
|
default = "";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
home.packages = [cfg.package];
|
||
|
};
|
||
|
}
|