-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathslock.nix
34 lines (28 loc) · 943 Bytes
/
slock.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib, config, pkgs, ... }:
let cfg = config.cookie.slock;
in with lib; {
options.cookie.slock = {
enable = mkEnableOption "slock screen locker";
};
config = mkIf cfg.enable {
programs.slock.enable = true;
nixpkgs.overlays = [
(self: super: {
slock = super.slock.override {
conf = ''
/* user and group to drop privileges to */
static const char *user = "nobody";
static const char *group = "nogroup";
static const char *colorname[NUMCOLS] = {
[INIT] = "#eb64b9", /* after initialization */
[INPUT] = "#ffe261", /* during input */
[FAILED] = "#ff665b", /* wrong password */
};
/* treat a cleared input like a wrong password (color) */
static const int failonclear = 0;'';
};
})
];
# TODO set the i3 locker here instead of in xsession
};
}