l: make screenlock configureable
This commit is contained in:
parent
cef1c830b1
commit
9064b8e5ce
@ -115,4 +115,6 @@ with import <stockholm/lib>;
|
||||
(pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAIDENC2G1.pem"; sha256 = "1z2qkyhgjvri13bvi06ynkb7mjmpcznmc9yw8chx1lnwc3cxa7kf"; })
|
||||
(pkgs.fetchurl { url = "http://pki.dcso.de/ca/PEM/DCSOCAIDENC3G1.pem"; sha256 = "0smdjjvz95n652cb45yhzdb2lr83zg52najgbzf6lm3w71f8mv7f"; })
|
||||
];
|
||||
|
||||
lass.screenlock.command = "${pkgs.i3lock}/bin/i3lock -i /home/lass/lock.png -t -f";
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ in {
|
||||
imports = [
|
||||
./mpv.nix
|
||||
./power-action.nix
|
||||
./screenlock.nix
|
||||
./copyq.nix
|
||||
./xresources.nix
|
||||
./livestream.nix
|
||||
@ -136,4 +135,5 @@ in {
|
||||
};
|
||||
|
||||
services.urxvtd.enable = true;
|
||||
lass.screenlock.enable = true;
|
||||
}
|
||||
|
@ -1,17 +0,0 @@
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
systemd.services.screenlock = {
|
||||
before = [ "sleep.target" ];
|
||||
wantedBy = [ "sleep.target" ];
|
||||
environment = {
|
||||
DISPLAY = ":0";
|
||||
};
|
||||
serviceConfig = {
|
||||
SyslogIdentifier = "screenlock";
|
||||
ExecStart = "${pkgs.i3lock}/bin/i3lock -i /var/lib/wallpaper/wallpaper -f";
|
||||
Type = "forking";
|
||||
User = "lass";
|
||||
};
|
||||
};
|
||||
}
|
@ -8,6 +8,7 @@ _:
|
||||
./mysql-backup.nix
|
||||
./news.nix
|
||||
./pyload.nix
|
||||
./screenlock.nix
|
||||
./umts.nix
|
||||
./usershadow.nix
|
||||
./xresources.nix
|
||||
|
37
lass/3modules/screenlock.nix
Normal file
37
lass/3modules/screenlock.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
with import <stockholm/lib>;
|
||||
|
||||
let
|
||||
cfg = config.lass.screenlock;
|
||||
|
||||
out = {
|
||||
options.lass.screenlock = api;
|
||||
config = mkIf cfg.enable imp;
|
||||
};
|
||||
|
||||
api = {
|
||||
enable = mkEnableOption "news";
|
||||
command = mkOption {
|
||||
type = types.str;
|
||||
default = "${pkgs.i3lock}/bin/i3lock -i /var/lib/wallpaper/wallpaper -f";
|
||||
};
|
||||
};
|
||||
|
||||
imp = {
|
||||
systemd.services.screenlock = {
|
||||
before = [ "sleep.target" ];
|
||||
wantedBy = [ "sleep.target" ];
|
||||
environment = {
|
||||
DISPLAY = ":0";
|
||||
};
|
||||
serviceConfig = {
|
||||
SyslogIdentifier = "screenlock";
|
||||
ExecStart = cfg.command;
|
||||
Type = "forking";
|
||||
User = "lass";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in out
|
@ -97,7 +97,7 @@ displaySomeException = displayException
|
||||
|
||||
myKeyMap :: [([Char], X ())]
|
||||
myKeyMap =
|
||||
[ ("M4-<F11>", spawn "${pkgs.i3lock}/bin/i3lock -i /var/lib/wallpaper/wallpaper -f")
|
||||
[ ("M4-<F11>", spawn "${config.lass.screenlock.command}")
|
||||
, ("M4-C-p", spawn "${pkgs.scrot}/bin/scrot ~/public_html/scrot.png")
|
||||
, ("M4-p", spawn "${pkgs.pass}/bin/passmenu --type")
|
||||
, ("M4-o", spawn "${pkgs.brain}/bin/brainmenu --type")
|
||||
|
Loading…
Reference in New Issue
Block a user