diff --git a/configs/home-manager/foo-dogsquared/modules/default.nix b/configs/home-manager/foo-dogsquared/modules/default.nix index 3d19d8a7..e34f84b4 100644 --- a/configs/home-manager/foo-dogsquared/modules/default.nix +++ b/configs/home-manager/foo-dogsquared/modules/default.nix @@ -12,6 +12,7 @@ ./programs/hledger.nix ./programs/keys.nix ./programs/nixvim + ./programs/nushell.nix ./programs/custom-homepage.nix ./programs/shell.nix ./programs/terminal-multiplexer.nix diff --git a/configs/home-manager/foo-dogsquared/modules/programs/nushell.nix b/configs/home-manager/foo-dogsquared/modules/programs/nushell.nix new file mode 100644 index 00000000..88a92ff4 --- /dev/null +++ b/configs/home-manager/foo-dogsquared/modules/programs/nushell.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: + +let + userCfg = config.users.foo-dogsquared; + cfg = userCfg.programs.nushell; +in +{ + options.users.foo-dogsquared.programs.nushell.enable = + lib.mkEnableOption "Nushell setup"; + + config = lib.mkIf cfg.enable (lib.mkMerge [ + { + programs.nushell = { + enable = true; + plugins = with pkgs.nushellPlugins; [ + dbus + query + skim + ]; + extraConfig = '' + $env.config.show_banner = false + ''; + }; + } + + (lib.mkIf config.programs.fzf.enable { + # TODO: + # - Learn how to define functions in Nushell. + # - Learn how to attach bindings in Nushell. + # - Port interactive selections from fzf. + home.file."${config.xdg.cacheHome}/nu + programs.nushell.extraConfig = '' + + ''; + }) + ]); +} diff --git a/configs/home-manager/foo-dogsquared/modules/programs/shell.nix b/configs/home-manager/foo-dogsquared/modules/programs/shell.nix index 4df3b737..ef1ef769 100644 --- a/configs/home-manager/foo-dogsquared/modules/programs/shell.nix +++ b/configs/home-manager/foo-dogsquared/modules/programs/shell.nix @@ -24,15 +24,6 @@ in ]; }; - programs.nushell = { - enable = true; - plugins = with pkgs.nushellPlugins; [ - dbus - query - skim - ]; - }; - programs.atuin = { enable = true; settings = { diff --git a/configs/home-manager/foo-dogsquared/modules/setups/development.nix b/configs/home-manager/foo-dogsquared/modules/setups/development.nix index 33e8f5d7..22317e94 100644 --- a/configs/home-manager/foo-dogsquared/modules/setups/development.nix +++ b/configs/home-manager/foo-dogsquared/modules/setups/development.nix @@ -21,7 +21,8 @@ in { ]; users.foo-dogsquared.programs = { - shell.enable = lib.mkDefault true; + shell.enable = true; + nushell.enable = true; git = { enable = lib.mkDefault true; instaweb.enable = true;