feat: reenable xorg for vr

This commit is contained in:
Patrick 2024-11-17 14:30:57 +01:00
parent f190614f61
commit d7eb08fa98
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
8 changed files with 149 additions and 156 deletions

View file

@ -222,7 +222,7 @@ in
systems.oauth2.netbird = {
public = true;
displayName = "Netbird";
originUrl = "https://netbird.${config.secrets.secrets.global.domains.web}/";
originUrl = "https://netbird.${config.secrets.secrets.global.domains.web}/#callback";
originLanding = "https://netbird.${config.secrets.secrets.global.domains.web}/";
preferShortUsername = true;
enableLocalhostRedirects = true;

View file

@ -1,14 +1,60 @@
{ pkgs, ... }:
{
home.packages = [
pkgs,
lib,
minimal,
config,
...
}:
lib.optionalAttrs (!minimal) {
hm.home.packages = [
pkgs.xclip
pkgs.xdragon
];
imports = [
../.
./rofi.nix
./i3.nix
];
#xsession.wallpapers.enable = true;
home.file.".xinitrc".source = ./xinitrc;
hm.home.file.".xinitrc".source = ./xinitrc;
# Configure keymap in X11
services.xserver = {
enable = true;
displayManager.startx.enable = true;
autoRepeatDelay = 235;
autoRepeatInterval = 60;
videoDrivers = [ "modesetting" ];
};
services.libinput = {
enable = true;
mouse = {
accelSpeed = "0.5";
accelProfile = "flat";
middleEmulation = false;
};
touchpad = {
accelProfile = "flat";
accelSpeed = "1";
naturalScrolling = true;
disableWhileTyping = true;
};
};
services.udev.extraRules =
let
exe = pkgs.writeShellScript "set-key-repeat" ''
if [ -d "/tmp/.X11-unix" ]; then
for D in /tmp/.X11-unix/*; do
file=$(${pkgs.coreutils}/bin/basename $D)
export DISPLAY=":''${file:1}"
user=$(${pkgs.coreutils}/bin/stat -c '%U' "$D")
# sleep to give X time to access the keyboard
(sleep 0.2; ${pkgs.util-linux}/bin/runuser -u "$user" -- ${pkgs.xorg.xset}/bin/xset r rate \
${toString config.services.xserver.autoRepeatDelay} ${toString config.services.xserver.autoRepeatInterval})&
done
fi
'';
in
''
ACTION=="add", SUBSYSTEM=="input", ATTRS{bInterfaceClass}=="03", RUN+="${exe}"
'';
}

View file

@ -1,17 +1,19 @@
{
config,
pkgs,
lib,
...
}:
{
# import shared sway config
imports = [ ../sway3.nix ];
imports = [ ./sway3.nix ];
hm =
{ config, ... }:
{
systemd.user.services = {
flameshot.Install.WantedBy = lib.mkForce [ "i3-session.target" ];
};
stylix.targets.i3.enable = true;
xsession.windowManager.i3 = {
enable = true;
enableSystemdTarget = true;
@ -100,4 +102,5 @@
};
};
};
};
}

View file

@ -1,6 +1,6 @@
{
stylix.targets.rofi.enable = true;
programs.rofi = {
hm.stylix.targets.rofi.enable = true;
hm.programs.rofi = {
enable = true;
extraConfig = {
matching = "fuzzy";

View file

@ -113,14 +113,6 @@ in
"x"
"p"
];
"gojo" = output "eDP-1" [
"1"
"2"
"3"
"4"
"5"
"6"
];
}
.${nixConfig.node.name} or [ ];

View file

@ -1,49 +0,0 @@
{
pkgs,
lib,
minimal,
config,
...
}:
lib.optionalAttrs (!minimal) {
# Configure keymap in X11
services.xserver = {
enable = true;
displayManager.startx.enable = true;
autoRepeatDelay = 235;
autoRepeatInterval = 60;
videoDrivers = [ "modesetting" ];
};
services.libinput = {
enable = true;
mouse = {
accelSpeed = "0.5";
accelProfile = "flat";
middleEmulation = false;
};
touchpad = {
accelProfile = "flat";
accelSpeed = "1";
naturalScrolling = true;
disableWhileTyping = true;
};
};
services.udev.extraRules =
let
exe = pkgs.writeShellScript "set-key-repeat" ''
if [ -d "/tmp/.X11-unix" ]; then
for D in /tmp/.X11-unix/*; do
file=$(${pkgs.coreutils}/bin/basename $D)
export DISPLAY=":''${file:1}"
user=$(${pkgs.coreutils}/bin/stat -c '%U' "$D")
# sleep to give X time to access the keyboard
(sleep 0.2; ${pkgs.util-linux}/bin/runuser -u "$user" -- ${pkgs.xorg.xset}/bin/xset r rate \
${toString config.services.xserver.autoRepeatDelay} ${toString config.services.xserver.autoRepeatInterval})&
done
fi
'';
in
''
ACTION=="add", SUBSYSTEM=="input", ATTRS{bInterfaceClass}=="03", RUN+="${exe}"
'';
}

View file

@ -55,6 +55,7 @@ lib.optionalAttrs (!minimal) {
./theme.nix
./wayland
./Xorg
./programs/bottles.nix
./programs/direnv.nix

View file

@ -213,13 +213,13 @@ in
xwayland.force_zero_scaling = true;
windowrulev2 = [
# fix these once nvidia gets their shit together
#"immediate, class:^(cs2)$"
"immediate, class:^(cs2)$"
# apex legends
"immediate, class:^(steam_app_1172470)$"
#???
"immediate, class:^(steam_app_238960)$"
#baldur
#"immediate, class:^(steam_app_1086940)$"
"immediate, class:^(steam_app_1086940)$"
"float, class:^(steam)$, title:^(Friends List)"
"float, class:^(steam)$, title:(Chat)"