mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-04 06:25:03 +08:00
add poweshell
This commit is contained in:
parent
dca6a7ba97
commit
4f8ff49764
2 changed files with 22 additions and 0 deletions
|
|
@ -12,6 +12,7 @@
|
|||
./direnv.nix
|
||||
./zellij.nix
|
||||
# ./nushell.nix (intergrates extremely poorly with the system)
|
||||
./powershell.nix
|
||||
];
|
||||
};
|
||||
common-linux = {
|
||||
|
|
|
|||
21
home/powershell.nix
Normal file
21
home/powershell.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
# TODO: Upstream as home-manager module: https://github.com/nix-community/home-manager/issues/2890
|
||||
#
|
||||
# FIXME: Powershell launch is quite slow, on macOS. So not using it as default shell.
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
powershell
|
||||
];
|
||||
|
||||
home.file.".config/powershell/Microsoft.PowerShell_profile.ps1".text = ''
|
||||
# starship
|
||||
Invoke-Expression (&starship init powershell)
|
||||
|
||||
# zoxide
|
||||
Invoke-Expression (& {
|
||||
$hook = if ($PSVersionTable.PSVersion.Major -lt 6) { 'prompt' } else { 'pwd' }
|
||||
(zoxide init --hook $hook powershell | Out-String)
|
||||
})
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue