Change vanguard to use steam gamescope by default

This commit is contained in:
Evie Litherland-Smith 2023-06-29 09:41:52 +01:00
parent 678fc72091
commit dac07a1229
2 changed files with 32 additions and 35 deletions

View file

@ -86,6 +86,27 @@
wallpaper = ,${wallpapers.outputs.default} wallpaper = ,${wallpapers.outputs.default}
''; '';
}; };
gamescope-config = {...}: {
hardware.steam-hardware.enable = true;
programs = {
gamescope = {
enable = true;
capSysNice = true;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
gamescopeSession.enable = true;
};
};
services.greetd = {
enable = true;
settings = rec {
initial_session.command = "steam-gamescope";
default_session = initial_session;
};
};
};
waybar-experimental = self: super: {waybar = super.waybar.overrideAttrs (oldAttrs: {mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];});}; waybar-experimental = self: super: {waybar = super.waybar.overrideAttrs (oldAttrs: {mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];});};
in { in {
nixosConfigurations = { nixosConfigurations = {
@ -118,34 +139,18 @@
}; };
modules = [ modules = [
home-config home-config
hyprland-config gamescope-config
./hosts/Vanguard ./hosts/Vanguard
./services/sshd ./services/sshd
./services/syncthing/Vanguard.nix ./services/syncthing/Vanguard.nix
{ {
home-manager.users.xenia = { home-manager.users.xenia = {
imports = [hyprland-home-config ./home/personal.nix]; imports = [./home/personal.nix];
home = { home = {
username = "xenia"; username = "xenia";
homeDirectory = "/home/xenia"; homeDirectory = "/home/xenia";
stateVersion = "22.11"; stateVersion = "22.11";
}; };
wayland.windowManager.hyprland.extraConfig = ''
source=./common.conf
monitor=DP-2,highrr,auto,auto
workspace = name:steam
windowrule = workspace name:steam, [Ss]team.*
bind = ALT, S, moveworkspacetomonitor, name:steam current
bind = ALT, S, workspace, name:steam
bind = ALT SHIFT, S, moveworkspacetomonitor, name:steam current
bind = ALT SHIFT, S, movetoworkspace, name:steam
exec-once = steam
'';
programs.waybar.settings = {
main."wlr/workspaces"."format-icons"."steam" = "󰓓";
};
}; };
} }
]; ];

View file

@ -12,26 +12,17 @@
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
networking = { networking.hostName = "Vanguard"; # Define your hostname.
hostName = "Vanguard"; # Define your hostname. networking.nameservers = ["192.168.1.230" "9.9.9.9"];
nameservers = ["192.168.1.230" "9.9.9.9"];
};
hardware.bluetooth.enable = true;
system.autoUpgrade = {
enable = true;
flake = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main";
allowReboot = false;
};
environment.systemPackages = with pkgs; [mesa];
# Steam hardware.bluetooth.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
};
hardware.steam-hardware.enable = true;
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;
system.autoUpgrade.enable = true;
system.autoUpgrade.flake = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main";
system.autoUpgrade.allowReboot = false;
environment.systemPackages = with pkgs; [mesa];
users.users.xenia = { users.users.xenia = {
isNormalUser = true; isNormalUser = true;
description = "Evie Litherland-Smith"; description = "Evie Litherland-Smith";
@ -39,6 +30,7 @@
shell = pkgs.fish; shell = pkgs.fish;
openssh.authorizedKeys.keys = import ../../auth/authorized_keys.nix; openssh.authorizedKeys.keys = import ../../auth/authorized_keys.nix;
}; };
services.greetd.settings.initial_session.user = "xenia"; services.greetd.settings.initial_session.user = "xenia";
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default