52 lines
1 KiB
Nix
52 lines
1 KiB
Nix
{pkgs, ...}: {
|
|
imports = [
|
|
(import ./swaylock.nix)
|
|
(import ./swayidle.nix)
|
|
(import ./waybar.nix)
|
|
];
|
|
xdg.portal = {
|
|
enable = true;
|
|
configPackages = [pkgs.sway];
|
|
extraPortals = [pkgs.xdg-desktop-portal-wlr pkgs.xdg-desktop-portal-gtk];
|
|
};
|
|
|
|
wayland.windowManager.sway = {
|
|
enable = true;
|
|
};
|
|
|
|
services.swayidle = {
|
|
enable = true;
|
|
systemdTarget = "graphical-session.target";
|
|
events = [
|
|
{
|
|
event = "before-sleep";
|
|
command = "${pkgs.swaylock-effects}/bin/swaylock";
|
|
}
|
|
{
|
|
event = "lock";
|
|
command = "${pkgs.swaylock-effects}/bin/swaylock";
|
|
}
|
|
];
|
|
timeouts = [
|
|
{
|
|
timeout = 300;
|
|
command = "${pkgs.swaylock-effects}/bin/swaylock -f";
|
|
}
|
|
{
|
|
timeout = 600;
|
|
command = "systemctl suspend";
|
|
}
|
|
];
|
|
};
|
|
|
|
services.mako.enable = true;
|
|
|
|
programs.waybar = {
|
|
enable = true;
|
|
settings = {
|
|
mainBar = {
|
|
modules-left = ["sway/workspaces" "sway/window"];
|
|
};
|
|
};
|
|
};
|
|
}
|