57 lines
1.2 KiB
Nix
57 lines
1.2 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib) types;
|
|
inherit (lib.options) mkEnableOption mkOption;
|
|
in
|
|
{
|
|
options.services.smooooth = {
|
|
enable = mkEnableOption "the smooooth nixos hot reloader";
|
|
blockers = mkOption {
|
|
description = "names of processes that may block reloading by holding a flake (sub)path open. default state is \"stop\"";
|
|
default = [
|
|
"nano"
|
|
"nvim"
|
|
"vim"
|
|
"vi"
|
|
"hx"
|
|
];
|
|
example = [
|
|
"hx"
|
|
{
|
|
nano = "die";
|
|
nvim = "stop";
|
|
}
|
|
{ fish = "die"; }
|
|
];
|
|
type =
|
|
with types;
|
|
listOf (
|
|
either str (
|
|
attrsOf (enum [
|
|
"stop"
|
|
"die"
|
|
])
|
|
)
|
|
);
|
|
};
|
|
path = mkOption {
|
|
description = "path to the root of your flake.";
|
|
type = types.str;
|
|
};
|
|
nixPackage = mkOption {
|
|
description = "preferred package providing a `nix` executable.";
|
|
default = pkgs.nix;
|
|
defaultText = "pkgs.nix";
|
|
type = types.package;
|
|
};
|
|
package = mkOption {
|
|
description = "smooooth package";
|
|
type = types.package;
|
|
};
|
|
};
|
|
}
|