users/foo-dogsquared/programs/nushell: init dedicated module

This commit is contained in:
Gabriel Arazas 2025-01-18 17:59:28 +08:00
parent 588457ec80
commit 29b9672b36
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
4 changed files with 40 additions and 10 deletions

View File

@ -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

View File

@ -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 = ''
'';
})
]);
}

View File

@ -24,15 +24,6 @@ in
];
};
programs.nushell = {
enable = true;
plugins = with pkgs.nushellPlugins; [
dbus
query
skim
];
};
programs.atuin = {
enable = true;
settings = {

View File

@ -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;