hosts: steamdeck: separate gnome and steam config
This commit is contained in:
parent
0b304408b3
commit
8e61ea6503
@ -22,6 +22,7 @@
|
||||
{
|
||||
imports = # For now, if applying to other system, swap files
|
||||
[(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
|
||||
[(import ../../modules/desktop/steam/default.nix)] ++ # Window Manager
|
||||
[(import ../../modules/desktop/gnome/default.nix)] ++ # Window Manager
|
||||
[(import ../../modules/desktop/virtualisation/docker.nix)] ++ # Docker
|
||||
(import ../../modules/hardware); # Hardware devices
|
||||
|
@ -16,7 +16,7 @@
|
||||
{
|
||||
imports =
|
||||
[
|
||||
#../../modules/desktop/hyprland/home.nix # Window Manager
|
||||
../../modules/desktop/steam/home.nix # Window Manager
|
||||
../../modules/desktop/gnome/home.nix # Window Manager
|
||||
../../modules/home.nix # Window Manager
|
||||
];
|
||||
|
@ -10,32 +10,14 @@
|
||||
# └─ ./gnome
|
||||
# └─ default.nix *
|
||||
#
|
||||
{ config, lib, user, pkgs, jovian-nixos, ... }:
|
||||
{ config, lib, user, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(jovian-nixos + "/modules")
|
||||
];
|
||||
|
||||
jovian = {
|
||||
steam.enable = true;
|
||||
devices.steamdeck = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.pulseaudio.enable = lib.mkForce false;
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome.gnome-terminal
|
||||
gnomeExtensions.dash-to-dock
|
||||
steamdeck-firmware
|
||||
rocm-opencl-icd
|
||||
rocm-opencl-runtime
|
||||
clinfo
|
||||
@ -54,52 +36,52 @@
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.gamescope-switcher = {
|
||||
wantedBy = [ "graphical.target" ];
|
||||
serviceConfig = {
|
||||
User = 2000;
|
||||
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
|
||||
else
|
||||
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
|
||||
'';
|
||||
};
|
||||
# systemd.services.gamescope-switcher = {
|
||||
# wantedBy = [ "graphical.target" ];
|
||||
# serviceConfig = {
|
||||
# User = 2000;
|
||||
# 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
|
||||
# else
|
||||
# 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
|
||||
# '';
|
||||
# };
|
||||
}
|
||||
|
40
modules/desktop/steam/default.nix
Normal file
40
modules/desktop/steam/default.nix
Normal file
@ -0,0 +1,40 @@
|
||||
#
|
||||
# Gnome configuration
|
||||
#
|
||||
# flake.nix
|
||||
# ├─ ./hosts
|
||||
# │ └─ ./laptop
|
||||
# │ └─ default.nix
|
||||
# └─ ./modules
|
||||
# └─ ./desktop
|
||||
# └─ ./gnome
|
||||
# └─ default.nix *
|
||||
#
|
||||
{ config, lib, user, pkgs, jovian-nixos, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(jovian-nixos + "/modules")
|
||||
];
|
||||
|
||||
jovian = {
|
||||
steam.enable = true;
|
||||
devices.steamdeck = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
steamdeck-firmware
|
||||
];
|
||||
|
||||
# services = {
|
||||
# };
|
||||
|
||||
}
|
16
modules/desktop/steam/home.nix
Normal file
16
modules/desktop/steam/home.nix
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# Gnome NixOS & Home manager configuration
|
||||
#
|
||||
# flake.nix
|
||||
# ├─ ./hosts
|
||||
# │ └─ ./steamdeck
|
||||
# │ └─ home.nix
|
||||
# └─ ./modules
|
||||
# └─ ./desktop
|
||||
# └─ ./steam
|
||||
# └─ home.nix *
|
||||
#
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue
Block a user