diff --git a/flake.lock b/flake.lock index 68eec1a..cbaede4 100644 --- a/flake.lock +++ b/flake.lock @@ -548,11 +548,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1776366610, - "narHash": "sha256-7HXk7GwK7fCiIQ3ep8SsKUkfWhOOWxARuBKRPqWy0fc=", + "lastModified": 1776422982, + "narHash": "sha256-H4TfZRvGyWHzY/o0JiSYj/0UOxLv4mOM38xQKUKFW6Q=", "ref": "refs/heads/main", - "rev": "434f8f8ffd3801cfeac82f6caaf1b58ef25e9c11", - "revCount": 344, + "rev": "1a78b5808d49131aa13371235172f31587f4af3f", + "revCount": 398, "type": "git", "url": "https://git.berlin.ccc.de/vinzenz/nova-shell" }, diff --git a/homeConfigurations/muede/default.nix b/homeConfigurations/muede/default.nix index 25b953d..9a5f714 100644 --- a/homeConfigurations/muede/default.nix +++ b/homeConfigurations/muede/default.nix @@ -12,7 +12,8 @@ ./podman.nix ./ssh.nix ./starship.nix - ./swaylock.nix + ./swayidle.nix + #./swaylock.nix #./swaync.nix ./vscode.nix # ./waybar.nix @@ -52,8 +53,10 @@ nova-shell = { enable = true; theme = { - fontSize = 13; + fontSize = 14; }; + #modules.backgroundOverlay.enable = false; + #modules.screenCorners.enable = false; }; }; diff --git a/homeConfigurations/muede/niri.nix b/homeConfigurations/muede/niri.nix index 4eebab7..d228899 100644 --- a/homeConfigurations/muede/niri.nix +++ b/homeConfigurations/muede/niri.nix @@ -402,6 +402,11 @@ "Mod+W".action.toggle-column-tabbed-display = { }; "Mod+O".action.toggle-overview = { }; + + "Super+Alt+L" = { + action.spawn = "${pkgs.systemd}/bin/loginctl lock-session"; + allow-when-locked = true; + }; }; }; }; diff --git a/homeConfigurations/muede/swayidle.nix b/homeConfigurations/muede/swayidle.nix new file mode 100644 index 0000000..73029e6 --- /dev/null +++ b/homeConfigurations/muede/swayidle.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: +{ + services.swayidle = + let + lock-command = "${pkgs.systemd}/bin/loginctl lock-session"; + in + { + enable = true; + systemdTarget = "graphical-session.target"; + timeouts = [ + { + timeout = 30; + command = lock-command; + } + { + timeout = 60 * 10; + command = "${pkgs.systemd}/bin/systemctl suspend"; + } + ]; + events = [ + { + event = "before-sleep"; + command = "${pkgs.playerctl}/bin/playerctl pause; ${lock-command}"; + } + ]; + }; +} diff --git a/homeConfigurations/muede/swaylock.nix b/homeConfigurations/muede/swaylock.nix index 064cb9b..f807135 100644 --- a/homeConfigurations/muede/swaylock.nix +++ b/homeConfigurations/muede/swaylock.nix @@ -1,10 +1,5 @@ # based on https://codeberg.org/kiara/cfg/src/commit/b9c472acd78c9c08dfe8b6a643c5c82cc5828433/home-manager/kiara/swaylock.nix# -{ - pkgs, - config, - lib, - ... -}: +{ pkgs, ... }: { stylix.targets.swaylock = { enable = true; @@ -30,34 +25,4 @@ indicator-thickness = 20; }; }; - - services.swayidle = { - enable = true; - systemdTarget = "graphical-session.target"; - timeouts = [ - { - timeout = 5; - command = "${config.programs.swaylock.package}/bin/swaylock"; - } - { - timeout = 60 * 10; - command = "${pkgs.systemd}/bin/systemctl suspend"; - } - ]; - events = [ - { - event = "before-sleep"; - command = "${pkgs.playerctl}/bin/playerctl pause; ${config.programs.swaylock.package}/bin/swaylock"; - } - { - event = "lock"; - command = "${config.programs.swaylock.package}/bin/swaylock"; - } - ]; - }; - - programs.niri.settings.binds."Super+Alt+L" = { - action.spawn = "${lib.getBin config.programs.swaylock.package}/bin/swaylock"; - allow-when-locked = true; - }; }