mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-10 18:57:22 +00:00
Instead of having to manually stub packages that should not be downloaded we instead automatically stub all packages (except a small list of whitelisted ones). Tests can re-introduce the real package by using the `realPkgs` module argument.
34 lines
878 B
Nix
34 lines
878 B
Nix
{ pkgs, config, ... }:
|
|
|
|
{
|
|
programs = {
|
|
nushell.enable = true;
|
|
|
|
oh-my-posh = {
|
|
enable = true;
|
|
useTheme = "jandedobbeleer";
|
|
};
|
|
};
|
|
|
|
nmt.script = let
|
|
configFile = if pkgs.stdenv.isDarwin && !config.xdg.enable then
|
|
"home-files/Library/Application Support/nushell/config.nu"
|
|
else
|
|
"home-files/.config/nushell/config.nu";
|
|
|
|
envFile = if pkgs.stdenv.isDarwin && !config.xdg.enable then
|
|
"home-files/Library/Application Support/nushell/env.nu"
|
|
else
|
|
"home-files/.config/nushell/env.nu";
|
|
in ''
|
|
assertFileExists "${envFile}"
|
|
assertFileRegex \
|
|
"${envFile}" \
|
|
'/bin/oh-my-posh init nu --config .*--print \| save --force /.*/home-files/\.cache/oh-my-posh/init\.nu'
|
|
|
|
assertFileExists "${configFile}"
|
|
assertFileRegex \
|
|
"${configFile}" \
|
|
'source /.*/\.cache/oh-my-posh/init\.nu'
|
|
'';
|
|
}
|