alpha
Login
or
Join now
hermes.pds.lassul.us
/
superconfig
forked from
lass.pds.lassul.us/superconfig
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
sway: use swaylock service
author
lassulus
date
10 months ago
(Dec 2, 2025, 1:48 PM CET)
commit
a0a51984
a0a51984980ae9c5c78a3a0f37d8d6886d5e9e59
parent
cd832943
cd8329434c47fb36da3f49211d1b01602a357801
+11
-7
2 changed files
Expand all
Collapse all
Unified
Split
2configs
desktops
lib
wayland.nix
sway
default.nix
+10
-6
2configs/desktops/lib/wayland.nix
View file
Reviewed
···
47
47
48
48
security.polkit.enable = true;
49
49
security.pam.services.swaylock = { };
50
50
+
security.pam.services.swaylock-plugin = { };
50
51
51
52
programs.dconf.enable = lib.mkDefault true;
52
53
services.gnome.gnome-keyring.enable = lib.mkDefault true;
···
125
126
description = "Screen locker for Wayland";
126
127
documentation = [ "man:swaylock(1)" ];
127
128
129
129
+
# Requires graphical session
130
130
+
requisite = [ "graphical-session.target" ];
131
131
+
after = [ "graphical-session.target" ];
132
132
+
128
133
# If swaylock exits cleanly, unlock the session:
129
134
onSuccess = [ "unlock.target" ];
130
135
···
136
141
wantedBy = [ "lock.target" ];
137
142
138
143
serviceConfig = {
139
139
-
# systemd will consider this service started when swaylock forks...
140
140
-
Type = "forking";
141
141
-
142
142
-
# ... and swaylock will fork only after it has locked the screen.
143
143
-
ExecStart = "${lib.getExe pkgs.swaylock} --image /var/lib/wallpaper/wallpaper -f";
144
144
-
144
144
+
Type = "simple";
145
145
# If swaylock crashes, always restart it immediately:
146
146
Restart = "on-failure";
147
147
RestartSec = 0;
148
148
};
149
149
+
150
150
+
path = [ pkgs.bash ];
151
151
+
152
152
+
serviceConfig.ExecStart = lib.getExe self.packages.${pkgs.system}.lockscreen;
149
153
};
150
154
}
+1
-1
2configs/desktops/sway/default.nix
View file
Reviewed
···
320
320
bindsym $mod+Escape workspace back_and_forth
321
321
322
322
# screenlock
323
323
-
bindsym $mod+F11 exec ${pkgs.swaylock}/bin/swaylock -f -c 000000
323
323
+
bindsym $mod+F11 exec ${lib.getExe' pkgs.systemd "systemctl"} --user start lock.target
324
324
325
325
# media buttons
326
326
bindsym XF86AudioMute exec ${pkgs.pulseaudio.out}/bin/pactl -- set-sink-mute @DEFAULT_SINK@ toggle