swaylock: Add module (#3003)
This commit is contained in:
parent
64ab7d6e8d
commit
70824bb5c7
9 changed files with 79 additions and 0 deletions
5
tests/modules/programs/swaylock/config
Normal file
5
tests/modules/programs/swaylock/config
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
color=808080
|
||||
font-size=24
|
||||
indicator-radius=100
|
||||
line-color=ffffff
|
||||
show-failed-attempts
|
||||
4
tests/modules/programs/swaylock/default.nix
Normal file
4
tests/modules/programs/swaylock/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
swaylock-disabled = import ./disabled.nix;
|
||||
swaylock-settings = import ./settings.nix;
|
||||
}
|
||||
7
tests/modules/programs/swaylock/disabled.nix
Normal file
7
tests/modules/programs/swaylock/disabled.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }: {
|
||||
programs.swaylock.settings = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/swaylock/config
|
||||
'';
|
||||
}
|
||||
16
tests/modules/programs/swaylock/settings.nix
Normal file
16
tests/modules/programs/swaylock/settings.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ ... }: {
|
||||
programs.swaylock.settings = {
|
||||
color = "808080";
|
||||
font-size = 24;
|
||||
indicator-idle-visible = false; # Test that this does nothing
|
||||
indicator-radius = 100;
|
||||
line-color = "ffffff";
|
||||
show-failed-attempts = true;
|
||||
};
|
||||
|
||||
nmt.script = let homeConfig = "home-files/.config/swaylock/config";
|
||||
in ''
|
||||
assertFileExists ${homeConfig}
|
||||
assertFileContent ${homeConfig} ${./config}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue