flameshot: add settings option

This commit is contained in:
Robert Helgesson 2021-10-11 21:41:49 +02:00
parent 32285d8fe6
commit 0b47ded208
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
5 changed files with 77 additions and 1 deletions

View file

@ -0,0 +1,4 @@
{
flameshot-empty-settings = ./empty-settings.nix;
flameshot-example-settings = ./example-settings.nix;
}

View file

@ -0,0 +1,13 @@
{ ... }:
{
config = {
services.flameshot = { enable = true; };
test.stubs.flameshot = { };
nmt.script = ''
assertPathNotExists home-files/.config/flameshot/flameshot.ini
'';
};
}

View file

@ -0,0 +1,30 @@
{ ... }:
{
config = {
services.flameshot = {
enable = true;
settings = {
General = {
disabledTrayIcon = true;
showStartupLaunchMessage = false;
};
};
};
test.stubs.flameshot = { };
nmt.script = ''
assertFileContent \
home-files/.config/flameshot/flameshot.ini \
${
builtins.toFile "expected.ini" ''
[General]
disabledTrayIcon=true
showStartupLaunchMessage=false
''
}
'';
};
}