fix swaylock for allegro
This commit is contained in:
parent
e84a8ae2ef
commit
28336a7951
1 changed files with 11 additions and 6 deletions
17
ui.nix
17
ui.nix
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
{ lib, config, pkgs, variant, ... }:
|
||||
let
|
||||
defaultTerminal = "alacritty";
|
||||
alacrittyLightTheme = "${pkgs.alacritty-theme}/night_owlish_light.toml";
|
||||
|
|
@ -108,12 +108,17 @@ in
|
|||
mimeApps.defaultApplications."TerminalEmulator" = "Alacritty.desktop";
|
||||
};
|
||||
|
||||
services.swayidle = {
|
||||
services.swayidle =
|
||||
let swaylock-bin = (if variant == "allegro"
|
||||
then "/usr/bin/swaylock"
|
||||
else "${config.programs.swaylock.package}/bin/swaylock");
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${config.programs.swaylock.package}/bin/swaylock -defF";
|
||||
command = "${swaylock-bin} -defF";
|
||||
}
|
||||
{
|
||||
event = "after-resume";
|
||||
|
|
@ -121,14 +126,14 @@ in
|
|||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${config.programs.swaylock.package}/bin/swaylock -defF";
|
||||
command = "${swaylock-bin} -defF";
|
||||
}
|
||||
];
|
||||
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 900;
|
||||
command = "${config.programs.swaylock.package}/bin/swaylock -defF";
|
||||
command = "${swaylock-bin} -defF";
|
||||
}
|
||||
{
|
||||
timeout = 900;
|
||||
|
|
@ -138,7 +143,7 @@ in
|
|||
};
|
||||
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
enable = (variant != "allegro");
|
||||
package = pkgs.swaylock-effects;
|
||||
settings = {
|
||||
screenshots = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue