Reformat all Nix files
This commit is contained in:
parent
9e0c1102a9
commit
355b63cf73
81 changed files with 2293 additions and 1153 deletions
|
@ -1,8 +1,17 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# lockColors = with config.lib.stylix.colors.withHashtag; { a = base00; b = base01; d = base00; }; # Black or White, depending on current theme
|
||||
# lockColors = with config.lib.stylix.colors.withHashtag; { a = base0A; b = base0B; d = base00; }; # Green + Yellow
|
||||
lockColors = { a = "#82a401"; b = "#466c01"; d = "#648901"; }; # Old
|
||||
lockColors = {
|
||||
a = "#82a401";
|
||||
b = "#466c01";
|
||||
d = "#648901";
|
||||
}; # Old
|
||||
lockSvg = pkgs.writeText "lock.svg" ''
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" height="50" width="50">
|
||||
<path fill="${lockColors.a}" d="M0 50h50V0H0z"/>
|
||||
|
@ -34,7 +43,9 @@ in
|
|||
}
|
||||
trap revert SIGHUP SIGINT SIGTERM
|
||||
${pkgs.xorg.xset}/bin/xset dpms 5 5 5
|
||||
${pkgs.i3lock}/bin/i3lock --nofork --color ${builtins.substring 1 6 lockColors.d} --image="$pattern" --tiling --ignore-empty-password
|
||||
${pkgs.i3lock}/bin/i3lock --nofork --color ${
|
||||
builtins.substring 1 6 lockColors.d
|
||||
} --image="$pattern" --tiling --ignore-empty-password
|
||||
revert
|
||||
fi
|
||||
'';
|
||||
|
@ -61,10 +72,13 @@ in
|
|||
};
|
||||
startup = [
|
||||
# Stop screen after 10 minutes, 1 minutes after lock it
|
||||
{ notification = false; command = "${pkgs.writeShellScript "xautolock-start" ''
|
||||
{
|
||||
notification = false;
|
||||
command = "${pkgs.writeShellScript "xautolock-start" ''
|
||||
echo enabled > ${xautolockState}
|
||||
${pkgs.xautolock}/bin/xautolock -time 10 -locker '${pkgs.xorg.xset}/bin/xset dpms force standby' -killtime 1 -killer xlock
|
||||
''}"; }
|
||||
''}";
|
||||
}
|
||||
# services.screen-locker.xautolock is hardcoded to use systemd for -locker (doesn't even work...)
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue