nixos/users/elitherl/Ronin.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

{pkgs, ...}: let
laptop-state = pkgs.writeShellScriptBin "check-laptop-lid-state" ''
grep closed /proc/acpi/button/lid/LID0/state &&\
hyprctl dispatch dpms off eDP-1 ||\
hyprctl dispatch dpms on eDP-1
'';
in {
imports = [./default.nix];
home-manager.users.elitherl = {
home.packages = with pkgs; [
zotero
openfortivpn
nomachine-client
teams-for-linux
zoom-us
laptop-state
];
wayland.windowManager.hyprland.extraConfig = ''
source=./common.conf
monitor = eDP-1,1920x1080,0x0,1.0
monitor = DP-3,1920x1200,1920x0,1.0
monitor = DP-4,1920x1080,3840x0,1.0,transform,1
bindl=,switch:Lid Switch,exec,check-laptop-lid-state
bindl=,switch:Lid Switch,exec,swaylock
2023-06-27 11:00:34 +01:00
exec = ${laptop-state}/bin/check-laptop-lid-state
'';
programs.waybar.settings = {
main."output" = "!DP-4";
alt = {
"include" = [
"~/.config/waybar/modules.json"
"~/.config/waybar/layout.json"
];
"output" = "DP-4";
2023-06-27 20:57:09 +01:00
"modules-left" = [];
"modules-center" = ["wlr/workspaces"];
"modules-right" = [];
};
};
};
}