From d602581a99fe43354d8598eb3222654962779457 Mon Sep 17 00:00:00 2001 From: alexion Date: Mon, 5 Oct 2026 00:11:51 -0400 Subject: [PATCH] refactor(nixos): inline shell shortcut type --- configs/nixos/registry/shell-shortcut.nix | 35 +++++++++++------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/configs/nixos/registry/shell-shortcut.nix b/configs/nixos/registry/shell-shortcut.nix index a43b028..c2a15c9 100644 --- a/configs/nixos/registry/shell-shortcut.nix +++ b/configs/nixos/registry/shell-shortcut.nix @@ -1,21 +1,20 @@ { 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."; + }; + }; + } + ); }