oh-my-posh: add module

This commit is contained in:
Arjan Schrijver 2022-09-29 13:08:53 +02:00 committed by Robert Helgesson
parent 183a62f356
commit 04e844090e
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
9 changed files with 184 additions and 0 deletions

View file

@ -0,0 +1,21 @@
{ ... }:
{
programs = {
bash.enable = true;
oh-my-posh = {
enable = true;
useTheme = "jandedobbeleer";
};
};
test.stubs.oh-my-posh = { };
nmt.script = ''
assertFileExists home-files/.bashrc
assertFileContains \
home-files/.bashrc \
'/bin/oh-my-posh init bash --config'
'';
}

View file

@ -0,0 +1,5 @@
{
oh-my-posh-bash = ./bash.nix;
oh-my-posh-zsh = ./zsh.nix;
oh-my-posh-fish = ./fish.nix;
}

View file

@ -0,0 +1,28 @@
{ lib, ... }:
{
programs = {
fish.enable = true;
oh-my-posh = {
enable = true;
useTheme = "jandedobbeleer";
};
};
# Needed to avoid error with dummy fish package.
xdg.dataFile."fish/home-manager_generated_completions".source =
lib.mkForce (builtins.toFile "empty" "");
test.stubs = {
oh-my-posh = { };
fish = { };
};
nmt.script = ''
assertFileExists home-files/.config/fish/config.fish
assertFileContains \
home-files/.config/fish/config.fish \
'/bin/oh-my-posh init fish --config'
'';
}

View file

@ -0,0 +1,24 @@
{ ... }:
{
programs = {
zsh.enable = true;
oh-my-posh = {
enable = true;
useTheme = "jandedobbeleer";
};
};
test.stubs = {
oh-my-posh = { };
zsh = { };
};
nmt.script = ''
assertFileExists home-files/.zshrc
assertFileContains \
home-files/.zshrc \
'/bin/oh-my-posh init zsh --config'
'';
}