imv: add module (#4032)
* imv: add module Signed-off-by: Christoph Heiss <christoph@c8h4.io> * imv: add test cases Signed-off-by: Christoph Heiss <christoph@c8h4.io> --------- Signed-off-by: Christoph Heiss <christoph@c8h4.io> Co-authored-by: Naïm Favier <n@monade.li>
This commit is contained in:
parent
3512a6dafb
commit
39c7d0a97a
8 changed files with 102 additions and 0 deletions
6
tests/modules/programs/imv/basic-configuration.conf
Normal file
6
tests/modules/programs/imv/basic-configuration.conf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Generated by Home Manager.
|
||||
[aliases]
|
||||
x=close
|
||||
|
||||
[options]
|
||||
background=ffffff
|
||||
20
tests/modules/programs/imv/basic-configuration.nix
Normal file
20
tests/modules/programs/imv/basic-configuration.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.imv = {
|
||||
enable = true;
|
||||
package = pkgs.writeScriptBin "dummy-imv" "";
|
||||
settings = {
|
||||
options.background = "ffffff";
|
||||
aliases.x = "close";
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/imv/config
|
||||
assertFileContent home-files/.config/imv/config \
|
||||
${./basic-configuration.conf}
|
||||
'';
|
||||
};
|
||||
}
|
||||
4
tests/modules/programs/imv/default.nix
Normal file
4
tests/modules/programs/imv/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
imv-basic-configuration = ./basic-configuration.nix;
|
||||
imv-empty-configuration = ./empty-configuration.nix;
|
||||
}
|
||||
14
tests/modules/programs/imv/empty-configuration.nix
Normal file
14
tests/modules/programs/imv/empty-configuration.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
programs.imv = {
|
||||
enable = true;
|
||||
package = pkgs.writeScriptBin "dummy-imv" "";
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/imv/config
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue