swaylock: Add module (#3003)

This commit is contained in:
rcerc 2022-06-07 15:01:14 -04:00 committed by GitHub
parent 64ab7d6e8d
commit 70824bb5c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 79 additions and 0 deletions

View file

@ -0,0 +1,5 @@
color=808080
font-size=24
indicator-radius=100
line-color=ffffff
show-failed-attempts

View file

@ -0,0 +1,4 @@
{
swaylock-disabled = import ./disabled.nix;
swaylock-settings = import ./settings.nix;
}

View file

@ -0,0 +1,7 @@
{ ... }: {
programs.swaylock.settings = { };
nmt.script = ''
assertPathNotExists home-files/.config/swaylock/config
'';
}

View 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}
'';
}