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
|
imports = # For now, if applying to other system, swap files
|
||||||
[(import ./hardware-configuration.nix)] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
|
[(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/gnome/default.nix)] ++ # Window Manager
|
||||||
[(import ../../modules/desktop/virtualisation/docker.nix)] ++ # Docker
|
[(import ../../modules/desktop/virtualisation/docker.nix)] ++ # Docker
|
||||||
(import ../../modules/hardware); # Hardware devices
|
(import ../../modules/hardware); # Hardware devices
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
#../../modules/desktop/hyprland/home.nix # Window Manager
|
../../modules/desktop/steam/home.nix # Window Manager
|
||||||
../../modules/desktop/gnome/home.nix # Window Manager
|
../../modules/desktop/gnome/home.nix # Window Manager
|
||||||
../../modules/home.nix # Window Manager
|
../../modules/home.nix # Window Manager
|
||||||
];
|
];
|
||||||
|
@ -10,32 +10,14 @@
|
|||||||
# └─ ./gnome
|
# └─ ./gnome
|
||||||
# └─ default.nix *
|
# └─ 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.pulseaudio.enable = lib.mkForce false;
|
||||||
|
|
||||||
hardware.opengl = {
|
|
||||||
enable = true;
|
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
gnome.gnome-terminal
|
gnome.gnome-terminal
|
||||||
gnomeExtensions.dash-to-dock
|
gnomeExtensions.dash-to-dock
|
||||||
steamdeck-firmware
|
|
||||||
rocm-opencl-icd
|
rocm-opencl-icd
|
||||||
rocm-opencl-runtime
|
rocm-opencl-runtime
|
||||||
clinfo
|
clinfo
|
||||||
@ -54,52 +36,52 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.gamescope-switcher = {
|
# systemd.services.gamescope-switcher = {
|
||||||
wantedBy = [ "graphical.target" ];
|
# wantedBy = [ "graphical.target" ];
|
||||||
serviceConfig = {
|
# serviceConfig = {
|
||||||
User = 2000;
|
# User = 2000;
|
||||||
PAMName = "login";
|
# PAMName = "login";
|
||||||
WorkingDirectory = "~";
|
# WorkingDirectory = "~";
|
||||||
|
#
|
||||||
TTYPath = "/dev/tty7";
|
# TTYPath = "/dev/tty7";
|
||||||
TTYReset = "yes";
|
# TTYReset = "yes";
|
||||||
TTYVHangup = "yes";
|
# TTYVHangup = "yes";
|
||||||
TTYVTDisallocate = "yes";
|
# TTYVTDisallocate = "yes";
|
||||||
|
#
|
||||||
StandardInput = "tty-fail";
|
# StandardInput = "tty-fail";
|
||||||
StandardOutput = "journal";
|
# StandardOutput = "journal";
|
||||||
StandardError = "journal";
|
# StandardError = "journal";
|
||||||
|
#
|
||||||
UtmpIdentifier = "tty7";
|
# UtmpIdentifier = "tty7";
|
||||||
UtmpMode = "user";
|
# UtmpMode = "user";
|
||||||
|
#
|
||||||
Restart = "always";
|
# Restart = "always";
|
||||||
};
|
# };
|
||||||
|
#
|
||||||
script = ''
|
# script = ''
|
||||||
set-session () {
|
# set-session () {
|
||||||
mkdir -p ~/.local/state
|
# mkdir -p ~/.local/state
|
||||||
>~/.local/state/steamos-session-select echo "$1"
|
# >~/.local/state/steamos-session-select echo "$1"
|
||||||
}
|
# }
|
||||||
consume-session () {
|
# consume-session () {
|
||||||
if [[ -e ~/.local/state/steamos-session-select ]]; then
|
# if [[ -e ~/.local/state/steamos-session-select ]]; then
|
||||||
cat ~/.local/state/steamos-session-select
|
# cat ~/.local/state/steamos-session-select
|
||||||
rm ~/.local/state/steamos-session-select
|
# rm ~/.local/state/steamos-session-select
|
||||||
else
|
# else
|
||||||
echo "gamescope"
|
# echo "gamescope"
|
||||||
fi
|
# fi
|
||||||
}
|
# }
|
||||||
while :; do
|
# while :; do
|
||||||
session=$(consume-session)
|
# session=$(consume-session)
|
||||||
case "$session" in
|
# case "$session" in
|
||||||
plasma)
|
# plasma)
|
||||||
dbus-run-session -- gnome-shell --display-server --wayland
|
# dbus-run-session -- gnome-shell --display-server --wayland
|
||||||
;;
|
# ;;
|
||||||
gamescope)
|
# gamescope)
|
||||||
steam-session
|
# steam-session
|
||||||
;;
|
# ;;
|
||||||
esac
|
# esac
|
||||||
done
|
# 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