48 lines
1.0 KiB
Nix
48 lines
1.0 KiB
Nix
#
|
|
# Sway NixOS & Home manager configuration
|
|
#
|
|
# flake.nix
|
|
# ├─ ./hosts
|
|
# │ └─ ./laptop
|
|
# │ └─ home.nix
|
|
# └─ ./modules
|
|
# └─ ./desktop
|
|
# └─ ./sway
|
|
# └─ home.nix *
|
|
#
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
programs = {
|
|
swaylock = {
|
|
enable = true;
|
|
settings = {
|
|
color = "000000";
|
|
image = "$HOME/.config/lockwall";
|
|
indicator-caps-lock = true;
|
|
show-keyboard-layout = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
services = {
|
|
swayidle = {
|
|
enable = true;
|
|
events = [
|
|
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock"; }
|
|
{ event = "lock"; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
|
|
];
|
|
timeouts = [
|
|
{ timeout = 300; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
|
|
{ timeout = 600; command = "${pkgs.niri}/bin/niri 'msg action power-off-monitors'"; }
|
|
];
|
|
};
|
|
};
|
|
|
|
xdg.configFile = {
|
|
"niri/config.kdl".source = ./config.kdl;
|
|
};
|
|
|
|
}
|