From b936165dedb9347725fa93e35ccaecd9bd55aa68 Mon Sep 17 00:00:00 2001 From: Tyler Starr Date: Sat, 2 Sep 2023 11:06:41 -0700 Subject: [PATCH] fix steam-deck? --- .../nixos/hosts/bulwark/configuration.nix | 7 +- provision/nixos/hosts/bulwark/steam-deck.nix | 66 +++++++++ .../nixos/hosts/kestrel/configuration.nix | 2 +- .../hosts/kestrel/home-configuration.nix | 10 +- provision/nixos/modules/gaming/default.nix | 2 +- provision/nixos/modules/gaming/steam-deck.nix | 130 ------------------ 6 files changed, 78 insertions(+), 139 deletions(-) create mode 100644 provision/nixos/hosts/bulwark/steam-deck.nix delete mode 100644 provision/nixos/modules/gaming/steam-deck.nix diff --git a/provision/nixos/hosts/bulwark/configuration.nix b/provision/nixos/hosts/bulwark/configuration.nix index f585f117..65f964c8 100644 --- a/provision/nixos/hosts/bulwark/configuration.nix +++ b/provision/nixos/hosts/bulwark/configuration.nix @@ -1,5 +1,10 @@ { config, lib, pkgs, pkgs-unstable, user, ... }: { + imports = [ + ./steam-deck.nix + ../../modules + ]; + nix = { package = pkgs.nixFlakes; extraOptions = "experimental-features = nix-command flakes"; @@ -108,7 +113,6 @@ }; # Enable modules - imports = [ ../../modules ]; modules = { services = { samba-client.enable = true; @@ -118,7 +122,6 @@ }; gaming = { steam.enable = true; - steam-deck.enable = true; }; }; diff --git a/provision/nixos/hosts/bulwark/steam-deck.nix b/provision/nixos/hosts/bulwark/steam-deck.nix new file mode 100644 index 00000000..7065d65b --- /dev/null +++ b/provision/nixos/hosts/bulwark/steam-deck.nix @@ -0,0 +1,66 @@ +{ config, lib, pkgs, pkgs-unstable, user, jovian-nixos, home-manager, ... }: +{ + imports = [ + (jovian-nixos + "/modules") + home-manager.nixosModule + ]; + + jovian = { + steam.desktopSession = "gnome-xorg"; + steam.enable = true; + steam.autoStart = true; + steam.user = "${user}"; + devices.steamdeck = { + enable = true; + }; + }; + + services.xserver.enable = true; + services.xserver.displayManager.gdm.enable = false; + services.xserver.desktopManager.gnome.enable = true; + + # Enable GNOME + sound.enable = true; + hardware.pulseaudio.enable = lib.mkForce false; + + environment.systemPackages = with pkgs; [ + gnome.gnome-terminal + gnomeExtensions.dash-to-dock + jupiter-dock-updater-bin + steamdeck-firmware + ]; + + # GNOME settings through home + home-manager.users.${user} = { + dconf.settings = { + # Enable on-screen keyboard + "org/gnome/desktop/a11y/applications" = { + screen-keyboard-enabled = true; + }; + "org/gnome/shell" = { + enabled-extensions = [ + "dash-to-dock@micxgx.gmail.com" + ]; + favorite-apps = ["steam.desktop"]; + }; + # Dash to Dock settings for a better touch screen experience + "org/gnome/shell/extensions/dash-to-dock" = { + background-opacity = 0.80000000000000004; + custom-theme-shrink = true; + dash-max-icon-size = 48; + dock-fixed = true; + dock-position = "LEFT"; + extend-height = true; + height-fraction = 0.60999999999999999; + hot-keys = false; + preferred-monitor = -2; + preferred-monitor-by-connector = "eDP-1"; + scroll-to-focused-application = true; + show-apps-at-top = true; + show-mounts = true; + show-show-apps-button = true; + show-trash = false; + }; + }; + }; +} diff --git a/provision/nixos/hosts/kestrel/configuration.nix b/provision/nixos/hosts/kestrel/configuration.nix index ffa86878..d35267bd 100644 --- a/provision/nixos/hosts/kestrel/configuration.nix +++ b/provision/nixos/hosts/kestrel/configuration.nix @@ -129,6 +129,6 @@ sway.enable = true; }; }; - + system.stateVersion = "23.05"; # Did you read the comment? } diff --git a/provision/nixos/hosts/kestrel/home-configuration.nix b/provision/nixos/hosts/kestrel/home-configuration.nix index d8ba8502..39f0af52 100644 --- a/provision/nixos/hosts/kestrel/home-configuration.nix +++ b/provision/nixos/hosts/kestrel/home-configuration.nix @@ -5,11 +5,11 @@ programs.home-manager.enable = true; # Setup git - #programs.git = { - # enable = true; - # userName = "starr-dusT"; - # userEmail = "starrtyler88@gmail.com" - #}; + programs.git = { + enable = true; + userName = "starr-dusT"; + userEmail = "starrtyler88@gmail.com"; + }; home.packages = with pkgs; [ chezmoi diff --git a/provision/nixos/modules/gaming/default.nix b/provision/nixos/modules/gaming/default.nix index cb30367e..11482080 100644 --- a/provision/nixos/modules/gaming/default.nix +++ b/provision/nixos/modules/gaming/default.nix @@ -1,4 +1,4 @@ { ... }: { - imports = [ ./steam.nix ./steam-deck.nix ]; + imports = [ ./steam.nix ]; } diff --git a/provision/nixos/modules/gaming/steam-deck.nix b/provision/nixos/modules/gaming/steam-deck.nix deleted file mode 100644 index b81f69d6..00000000 --- a/provision/nixos/modules/gaming/steam-deck.nix +++ /dev/null @@ -1,130 +0,0 @@ -{ config, lib, pkgs, pkgs-unstable, user, jovian-nixos, home-manager, ... }: - -let - cfg = config.modules.gaming.steam-deck; -in { - imports = [ - (jovian-nixos + "/modules") - home-manager.nixosModule - ]; - options.modules.gaming.steam-deck.enable = lib.mkEnableOption "steam-deck"; - config = lib.mkIf cfg.enable { - - jovian = { - steam.desktopSession = "gnome-xorg"; - steam.enable = true; - steam.autoStart = true; - steam.user = "${user}"; - devices.steamdeck = { - enable = true; - }; - }; - - #services.xserver.displayManager.gdm.wayland = lib.mkForce true; # lib.mkForce is only required on my setup because I'm using some other NixOS configs that conflict with this value - #services.xserver.displayManager.defaultSession = "steam-wayland"; - #services.xserver.displayManager.autoLogin.enable = true; - #services.xserver.displayManager.autoLogin.user = "${user}"; - services.xserver.enable = true; - services.xserver.displayManager.gdm.enable = false; - services.xserver.desktopManager.gnome.enable = true; - - # Enable GNOME - sound.enable = true; - hardware.pulseaudio.enable = lib.mkForce false; - - # Create user - users.users.${user} = { - isNormalUser = true; - }; - - #systemd.services.gamescope-switcher = { - # wantedBy = [ "graphical.target" ]; - # serviceConfig = { - # User = 1000; - # PAMName = "login"; - # WorkingDirectory = "~"; - - # TTYPath = "/dev/tty7"; - # TTYReset = "yes"; - # TTYVHangup = "yes"; - # TTYVTDisallocate = "yes"; - - # StandardInput = "tty-fail"; - # StandardOutput = "journal"; - # StandardError = "journal"; - - # UtmpIdentifier = "tty7"; - # UtmpMode = "user"; - - # Restart = "always"; - # }; - - # script = '' - # set-session () { - # mkdir -p ~/.local/state - # >~/.local/state/steamos-session-select echo "$1" - # } - # consume-session () { - # if [[ -e ~/.local/state/steamos-session-select ]]; then - # cat ~/.local/state/steamos-session-select - # rm ~/.local/state/steamos-session-select - # else58 closure - # echo "gamescope" - # fi - # } - # while :; do - # session=$(consume-session) - # case "$session" in - # plasma) - # dbus-run-session -- gnome-shell --display-server --wayland - # ;; - # gamescope) - # steam-session - # ;; - # esac - # done - # ''; - #}; - - environment.systemPackages = with pkgs; [ - gnome.gnome-terminal - gnomeExtensions.dash-to-dock - jupiter-dock-updater-bin - steamdeck-firmware - ]; - - # GNOME settings through home - home-manager.users.${user} = { - dconf.settings = { - # Enable on-screen keyboard - "org/gnome/desktop/a11y/applications" = { - screen-keyboard-enabled = true; - }; - "org/gnome/shell" = { - enabled-extensions = [ - "dash-to-dock@micxgx.gmail.com" - ]; - favorite-apps = ["steam.desktop"]; - }; - # Dash to Dock settings for a better touch screen experience - "org/gnome/shell/extensions/dash-to-dock" = { - background-opacity = 0.80000000000000004; - custom-theme-shrink = true; - dash-max-icon-size = 48; - dock-fixed = true; - dock-position = "LEFT"; - extend-height = true; - height-fraction = 0.60999999999999999; - hot-keys = false; - preferred-monitor = -2; - preferred-monitor-by-connector = "eDP-1"; - scroll-to-focused-application = true; - show-apps-at-top = true; - show-mounts = true; - show-show-apps-button = true; - show-trash = false; - }; - }; - }; - }; -}