23 lines
617 B
Nix
23 lines
617 B
Nix
{ pkgs, config, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.eboskma.programs.nushell;
|
|
starship-nu = pkgs.runCommand "starship-nu" { } ''${pkgs.starship}/bin/starship init nu > $out'';
|
|
zoxide-nu = pkgs.runCommand "zoxide-nu" { } ''${pkgs.zoxide}/bin/zoxide init nushell > $out'';
|
|
in
|
|
{
|
|
options.eboskma.programs.nushell = { enable = mkEnableOption "nu shell"; };
|
|
|
|
config = mkIf cfg.enable {
|
|
programs.nushell = {
|
|
enable = true;
|
|
configFile.source = ./config.nu;
|
|
envFile.source = ./env.nu;
|
|
|
|
extraConfig = ''
|
|
source ${starship-nu}
|
|
source ${zoxide-nu}
|
|
'';
|
|
};
|
|
};
|
|
}
|