From 20b8f92bb819b5fb0ccab93164f42c01d1e5dea1 Mon Sep 17 00:00:00 2001 From: Tyler Starr Date: Wed, 30 Aug 2023 20:26:55 -0700 Subject: [PATCH] updates for steam deck --- .../nixos/hosts/bulwark/configuration.nix | 4 +- provision/nixos/hosts/bulwark/hardware.nix | 14 ++- provision/nixos/modules/gaming/steam-deck.nix | 104 +++++++++--------- 3 files changed, 63 insertions(+), 59 deletions(-) diff --git a/provision/nixos/hosts/bulwark/configuration.nix b/provision/nixos/hosts/bulwark/configuration.nix index 81b294dc..a6a63c82 100644 --- a/provision/nixos/hosts/bulwark/configuration.nix +++ b/provision/nixos/hosts/bulwark/configuration.nix @@ -17,7 +17,7 @@ nixpkgs.overlays = import ../../lib/overlays.nix; # Use zen kernel - boot.kernelPackages = pkgs.linuxPackages_zen; + # boot.kernelPackages = pkgs.linuxPackages_zen; # Hardware options hardware.bluetooth.enable = true; @@ -77,6 +77,8 @@ unzip nnn advcpmv + neovim + ungoogled-chromium ]; # Enable user services diff --git a/provision/nixos/hosts/bulwark/hardware.nix b/provision/nixos/hosts/bulwark/hardware.nix index 2fe63f61..dde82a3d 100644 --- a/provision/nixos/hosts/bulwark/hardware.nix +++ b/provision/nixos/hosts/bulwark/hardware.nix @@ -5,26 +5,26 @@ { imports = - [ (modulesPath + "/profiles/qemu-guest.nix") + [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/1fddaaed-6ad9-4e7f-b613-3059e2cb019b"; + { device = "/dev/disk/by-uuid/ff26006b-37a0-4cfe-901b-6c1fb4d2cbbb"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/AA59-9D24"; + { device = "/dev/disk/by-uuid/80B1-3DF9"; fsType = "vfat"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/a7cd6a07-c564-4056-a1b5-69a71effd237"; } + [ { device = "/dev/disk/by-uuid/b11acbe6-69f7-4a03-a79e-c17a5563ed17"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -32,7 +32,9 @@ # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0f3u1u3.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/provision/nixos/modules/gaming/steam-deck.nix b/provision/nixos/modules/gaming/steam-deck.nix index 6efef465..4189548c 100644 --- a/provision/nixos/modules/gaming/steam-deck.nix +++ b/provision/nixos/modules/gaming/steam-deck.nix @@ -12,80 +12,80 @@ in { jovian = { + steam.desktopSession = "gnome-xorg"; steam.enable = true; steam.autoStart = true; steam.user = "${user}"; devices.steamdeck = { - enable = false; + 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.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; - services.xserver.desktopManager.gnome = { - enable = true; - }; - # Create user users.users.${user} = { isNormalUser = true; }; - systemd.services.gamescope-switcher = { - wantedBy = [ "graphical.target" ]; - serviceConfig = { - User = 1000; - PAMName = "login"; - WorkingDirectory = "~"; + #systemd.services.gamescope-switcher = { + # wantedBy = [ "graphical.target" ]; + # serviceConfig = { + # User = 1000; + # PAMName = "login"; + # WorkingDirectory = "~"; - TTYPath = "/dev/tty7"; - TTYReset = "yes"; - TTYVHangup = "yes"; - TTYVTDisallocate = "yes"; + # TTYPath = "/dev/tty7"; + # TTYReset = "yes"; + # TTYVHangup = "yes"; + # TTYVTDisallocate = "yes"; - StandardInput = "tty-fail"; - StandardOutput = "journal"; - StandardError = "journal"; + # StandardInput = "tty-fail"; + # StandardOutput = "journal"; + # StandardError = "journal"; - UtmpIdentifier = "tty7"; - UtmpMode = "user"; + # UtmpIdentifier = "tty7"; + # UtmpMode = "user"; - Restart = "always"; - }; + # 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 - ''; - }; + # 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