parent
6e277d9566
commit
f61917cbaa
9 changed files with 164 additions and 0 deletions
28
tests/modules/programs/fastfetch/basic-configuration.jsonc
Executable file
28
tests/modules/programs/fastfetch/basic-configuration.jsonc
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"display": {
|
||||
"binaryPrefix": "si",
|
||||
"color": "blue",
|
||||
"separator": " "
|
||||
},
|
||||
"logo": {
|
||||
"padding": {
|
||||
"right": 1
|
||||
},
|
||||
"source": "nixos_small"
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"format": "{1}-{3}-{11}",
|
||||
"key": "Date",
|
||||
"type": "datetime"
|
||||
},
|
||||
{
|
||||
"format": "{14}:{17}:{20}",
|
||||
"key": "Time",
|
||||
"type": "datetime"
|
||||
},
|
||||
"break",
|
||||
"player",
|
||||
"media"
|
||||
]
|
||||
}
|
||||
39
tests/modules/programs/fastfetch/basic-configuration.nix
Normal file
39
tests/modules/programs/fastfetch/basic-configuration.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
settings = {
|
||||
logo = {
|
||||
source = "nixos_small";
|
||||
padding = { right = 1; };
|
||||
};
|
||||
display = {
|
||||
binaryPrefix = "si";
|
||||
color = "blue";
|
||||
separator = " ";
|
||||
};
|
||||
modules = [
|
||||
{
|
||||
type = "datetime";
|
||||
key = "Date";
|
||||
format = "{1}-{3}-{11}";
|
||||
}
|
||||
{
|
||||
type = "datetime";
|
||||
key = "Time";
|
||||
format = "{14}:{17}:{20}";
|
||||
}
|
||||
"break"
|
||||
"player"
|
||||
"media"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.fastfetch = { };
|
||||
|
||||
nmt.script = let configFile = "home-files/.config/fastfetch/config.jsonc";
|
||||
in ''
|
||||
assertFileExists "${configFile}"
|
||||
assertFileContent "${configFile}" ${./basic-configuration.jsonc}
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
programs.fastfetch.enable = true;
|
||||
|
||||
test.stubs.fastfetch = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists "home-files/.config/fastfetch/config.jsonc"
|
||||
'';
|
||||
}
|
||||
4
tests/modules/programs/fastfetch/default.nix
Normal file
4
tests/modules/programs/fastfetch/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
fastfetch-default-configuration = ./default-configuration.nix;
|
||||
fastfetch-basic-configuration = ./basic-configuration.nix;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue