refactor(nixos): inline shell shortcut type
This commit is contained in:
@@ -1,21 +1,20 @@
|
|||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
let
|
|
||||||
entryType = lib.types.submodule {
|
|
||||||
options = {
|
|
||||||
command = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
example = "nvim";
|
|
||||||
description = "Command expanded by this shell shortcut.";
|
|
||||||
};
|
|
||||||
|
|
||||||
abbreviation = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether fish realizes this shell shortcut as an abbreviation instead of an alias.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
type = lib.types.coercedTo lib.types.str (command: { inherit command; }) entryType;
|
type = lib.types.coercedTo lib.types.str (command: { inherit command; }) (
|
||||||
|
lib.types.submodule {
|
||||||
|
options = {
|
||||||
|
command = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
example = "nvim";
|
||||||
|
description = "Command expanded by this shell shortcut.";
|
||||||
|
};
|
||||||
|
|
||||||
|
abbreviation = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Whether fish realizes this shell shortcut as an abbreviation instead of an alias.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user