]> Git — Sourcephile - julm/julm-nix.git/blob - homes/softwares/xmonad.nix
oignon: add QGIS
[julm/julm-nix.git] / homes / softwares / xmonad.nix
1 { pkgs, lib, config, ... }:
2 {
3 config = lib.mkIf config.xsession.windowManager.xmonad.enable {
4 home.file = {
5 ".xmonad/xmobar.hs".source = xmonad/xmobar.hs;
6 };
7 xsession = {
8 scriptPath = ".hm-xsession";
9 initExtra = ''
10 xset dpms 380 640 1200
11 ${pkgs.xorg.xsetroot}/bin/xsetroot -solid black -fg black -bg white -cursor_name left_ptr
12 ${pkgs.rxvt-unicode}/bin/urxvtd -f -o
13 ${pkgs.parcellite}/bin/parcellite &
14 ${pkgs.pasystray}/bin/pasystray &
15 '';
16 windowManager.xmonad = {
17 haskellPackages = pkgs.haskellPackages;
18 #extraPackages = haskellPackages: [ ];
19 enableContribAndExtras = true;
20 config = xmonad/xmonad.hs;
21 };
22 };
23 services.screen-locker = {
24 enable = true;
25 lockCmd = toString (pkgs.writeShellScript "xsecurelock" ''
26 export PATH=${with pkgs; lib.makeBinPath [coreutils gnugrep xsecurelock xorg.xset]}
27 XSECURELOCK_BLANK_DPMS_STATE=off \
28 XSECURELOCK_BLANK_TIMEOUT=1 \
29 XSECURELOCK_DIM_TIME_MS=2000 \
30 XSECURELOCK_DISCARD_FIRST_KEYPRESS=0 \
31 XSECURELOCK_SAVER=saver_blank \
32 XSECURELOCK_SHOW_DATETIME=1 \
33 XSECURELOCK_SHOW_HOSTNAME=1 \
34 XSECURELOCK_SHOW_USERNAME=1 \
35 XSECURELOCK_WAIT_TIME_MS=2000 \
36 ${pkgs.xsecurelock}/bin/xsecurelock
37 '');
38 #XSECURELOCK_SWITCH_USER_COMMAND="${pkgs.lightdm}/bin/dm-tool switch-to-greeter" \
39 enableDetectSleep = true;
40 inactiveInterval = lib.mkDefault 3; # minutes
41 xssLockExtraOptions = [
42 "--transfer-sleep-lock"
43 #"-n" "${pkgs.xss-lock}/share/doc/xss-lock/dim-screen.sh"
44 ];
45 };
46 home.packages = [
47 pkgs.acpilight
48 pkgs.gmrun
49 pkgs.light
50 pkgs.rxvt-unicode
51 pkgs.stalonetray
52 pkgs.wmname
53 #pkgs.xautolock
54 #pkgs.xlockmore
55 pkgs.xmobar
56 pkgs.xorg.xev
57 pkgs.xorg.xhost
58 pkgs.xorg.xmodmap
59 pkgs.xorg.xset
60 pkgs.xsecurelock
61 pkgs.xss-lock
62 ] ++ lib.optionals config.host.desktop [
63 pkgs.mate.caja
64 ];
65 };
66 }