From dac07a12293ca1bede0cd42abd10cccb6d16533e Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 29 Jun 2023 09:41:52 +0100 Subject: [PATCH] Change vanguard to use steam gamescope by default --- flake.nix | 41 ++++++++++++++++++-------------- hosts/Vanguard/configuration.nix | 26 +++++++------------- 2 files changed, 32 insertions(+), 35 deletions(-) diff --git a/flake.nix b/flake.nix index 3d6b282d..2669c557 100644 --- a/flake.nix +++ b/flake.nix @@ -86,6 +86,27 @@ 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"];});}; in { nixosConfigurations = { @@ -118,34 +139,18 @@ }; modules = [ home-config - hyprland-config + gamescope-config ./hosts/Vanguard ./services/sshd ./services/syncthing/Vanguard.nix { home-manager.users.xenia = { - imports = [hyprland-home-config ./home/personal.nix]; + imports = [./home/personal.nix]; home = { username = "xenia"; homeDirectory = "/home/xenia"; 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" = "󰓓"; - }; }; } ]; diff --git a/hosts/Vanguard/configuration.nix b/hosts/Vanguard/configuration.nix index 0de3103a..3ce2b606 100644 --- a/hosts/Vanguard/configuration.nix +++ b/hosts/Vanguard/configuration.nix @@ -12,26 +12,17 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - networking = { - hostName = "Vanguard"; # Define your hostname. - 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]; + networking.hostName = "Vanguard"; # Define your hostname. + networking.nameservers = ["192.168.1.230" "9.9.9.9"]; - # Steam - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - }; - hardware.steam-hardware.enable = true; + hardware.bluetooth.enable = 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 = { isNormalUser = true; description = "Evie Litherland-Smith"; @@ -39,6 +30,7 @@ shell = pkgs.fish; openssh.authorizedKeys.keys = import ../../auth/authorized_keys.nix; }; + services.greetd.settings.initial_session.user = "xenia"; # This value determines the NixOS release from which the default