style: use alejandra formatter on all nix files
This commit is contained in:
parent
d563805909
commit
0d8a394dcf
76 changed files with 1287 additions and 935 deletions
|
@ -1,31 +1,43 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.desktop.sway;
|
||||
in
|
||||
{
|
||||
config = mkIf config.modules.desktop.sway.enable {
|
||||
in {
|
||||
config = mkIf config.modules.desktop.sway.enable {
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 300;
|
||||
command = if cfg.swaylock.useNullPackage then ''/usr/bin/swaylock -f'' else ''${pkgs.swaylock}/bin/swaylock -f'';
|
||||
command =
|
||||
if cfg.swaylock.useNullPackage
|
||||
then ''/usr/bin/swaylock -f''
|
||||
else ''${pkgs.swaylock}/bin/swaylock -f'';
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
command = ''${pkgs.sway}/bin/swaymsg "output * power off"'';
|
||||
resumeCommand =''${pkgs.sway}/bin/swaymsg "output * power on"'';
|
||||
resumeCommand = ''${pkgs.sway}/bin/swaymsg "output * power on"'';
|
||||
}
|
||||
];
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = if cfg.swaylock.useNullPackage then ''/usr/bin/swaylock -f'' else ''${pkgs.swaylock}/bin/swaylock -f'';
|
||||
command =
|
||||
if cfg.swaylock.useNullPackage
|
||||
then ''/usr/bin/swaylock -f''
|
||||
else ''${pkgs.swaylock}/bin/swaylock -f'';
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = if cfg.swaylock.useNullPackage then ''usr/bin/swaylock -f'' else ''${pkgs.swaylock}/bin/swaylock -f'';
|
||||
command =
|
||||
if cfg.swaylock.useNullPackage
|
||||
then ''usr/bin/swaylock -f''
|
||||
else ''${pkgs.swaylock}/bin/swaylock -f'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue