~cyplo/dotfiles

c1aa21e66f0549386d770eb96f7f3ae920692577 — Cyryl Płotnicki 2 months ago 077d5b4
allow normal user to restart i3 from the commandline
2 files changed, 5 insertions(+), 17 deletions(-)

M nixos/i3/default.nix
M nixos/i3/grobi.nix
M nixos/i3/default.nix => nixos/i3/default.nix +4 -0
@@ 8,6 8,10 @@
  security.sudo.extraRules = [
    {
      users = [ "cyryl" ];
      commands = [ { command = "${pkgs.i3}/bin/i3-msg"; options = [ "NOPASSWD" ]; } ];
    }
    {
      users = [ "cyryl" ];
      commands = [ { command = "${pkgs.intel-gpu-tools}/bin/intel_gpu_top"; options = [ "NOPASSWD" ]; } ];
    }
  ];

M nixos/i3/grobi.nix => nixos/i3/grobi.nix +1 -17
@@ 6,7 6,7 @@
    enable = true;
    executeAfter = [
      "${pkgs.systemd}/bin/systemctl --user restart picom"
      "${pkgs.systemd}/bin/systemctl --user restart kdeconnect-indicator kdeconnect network-manager-applet pasystray udiskie"
      "${pkgs.i3}/bin/i3-msg restart"
    ];
    rules = [
      {


@@ 36,22 36,6 @@
          "${pkgs.xorg.xrandr}/bin/xrandr --output eDP1 --primary"
        ];
      }
      {
        name = "form3-docked";
        outputs_connected = [ "eDP-1-1" "DP-1-1" ];
        configure_single = "DP-1-1";
        execute_after = [
          "${pkgs.xorg.xrandr}/bin/xrandr --dpi 192"
        ];
      }
      {
        name = "form3";
        outputs_connected = [ "eDP-1-1" ];
        configure_single = "eDP-1-1";
        execute_after = [
          "${pkgs.xorg.xrandr}/bin/xrandr --dpi 256"
        ];
      }
    ];
  };
}