oh-my-posh: add module
This commit is contained in:
parent
183a62f356
commit
04e844090e
9 changed files with 184 additions and 0 deletions
21
tests/modules/programs/oh-my-posh/bash.nix
Normal file
21
tests/modules/programs/oh-my-posh/bash.nix
Normal 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'
|
||||
'';
|
||||
}
|
||||
5
tests/modules/programs/oh-my-posh/default.nix
Normal file
5
tests/modules/programs/oh-my-posh/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
oh-my-posh-bash = ./bash.nix;
|
||||
oh-my-posh-zsh = ./zsh.nix;
|
||||
oh-my-posh-fish = ./fish.nix;
|
||||
}
|
||||
28
tests/modules/programs/oh-my-posh/fish.nix
Normal file
28
tests/modules/programs/oh-my-posh/fish.nix
Normal 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'
|
||||
'';
|
||||
}
|
||||
24
tests/modules/programs/oh-my-posh/zsh.nix
Normal file
24
tests/modules/programs/oh-my-posh/zsh.nix
Normal 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'
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue