mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-31 04:04:32 +00:00
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{ lib, pkgs, realPkgs, config, ... }:
|
|
|
|
{
|
|
programs = {
|
|
nix-your-shell = {
|
|
enable = true;
|
|
enableFishIntegration = true;
|
|
enableNushellIntegration = true;
|
|
enableZshIntegration = true;
|
|
};
|
|
fish.enable = true;
|
|
nushell.enable = true;
|
|
zsh.enable = true;
|
|
};
|
|
|
|
_module.args.pkgs = lib.mkForce realPkgs;
|
|
|
|
nmt.script = let
|
|
nushellConfigDir = if pkgs.stdenv.isDarwin && !config.xdg.enable then
|
|
"home-files/Library/Application Support/nushell"
|
|
else
|
|
"home-files/.config/nushell";
|
|
in ''
|
|
assertFileExists home-files/.config/fish/config.fish
|
|
assertFileRegex \
|
|
home-files/.config/fish/config.fish \
|
|
'/nix/store/[^/]*-nix-your-shell-[^/]*/bin/nix-your-shell fish | source'
|
|
|
|
assertFileExists ${nushellConfigDir}/config.nu
|
|
assertFileRegex \
|
|
${nushellConfigDir}/config.nu \
|
|
'source /nix/store/[^/]*-nix-your-shell-nushell-config'
|
|
|
|
assertFileExists home-files/.zshrc
|
|
assertFileRegex \
|
|
home-files/.zshrc \
|
|
'/nix/store/[^/]*-nix-your-shell-[^/]*/bin/nix-your-shell zsh | source /dev/stdin'
|
|
'';
|
|
}
|