feat(bbsteamie): set plymouth to bgrt
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
8aa6f5b2b0
commit
eba41259b4
4 changed files with 164 additions and 157 deletions
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
@ -57,8 +56,7 @@ in {
|
||||||
|
|
||||||
boot.plymouth = {
|
boot.plymouth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = "steamos";
|
theme = "bgrt";
|
||||||
themePackages = [pkgs.steamdeck-hw-theme];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.kmscon.enable = true;
|
services.kmscon.enable = true;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{pkgs, ...}: let
|
{pkgs, ...}: let
|
||||||
# switch to wayland when possible
|
|
||||||
defaultSession = "plasma";
|
defaultSession = "plasma";
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
|
|
|
@ -3,108 +3,113 @@ defaultSession: {
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
inherit (lib) findFirst getExe mkForce;
|
config = let
|
||||||
|
inherit (lib) findFirst getExe mkForce;
|
||||||
|
|
||||||
inherit (config.vars) mainUser;
|
inherit (config.vars) mainUser;
|
||||||
|
|
||||||
switch-session = pkgs.writeShellApplication {
|
switch-session = pkgs.writeShellApplication {
|
||||||
name = "switch-session";
|
name = "switch-session";
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
mkdir -p /etc/sddm.conf.d
|
mkdir -p /etc/sddm.conf.d
|
||||||
|
|
||||||
cat <<EOF | tee /etc/sddm.conf.d/autologin.conf
|
cat <<EOF | tee /etc/sddm.conf.d/autologin.conf
|
||||||
[Autologin]
|
[Autologin]
|
||||||
User=${mainUser}
|
User=${mainUser}
|
||||||
Session=$1
|
Session=$1
|
||||||
Relogin=true
|
Relogin=true
|
||||||
EOF
|
EOF
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
gaming-mode = pkgs.writeShellScriptBin "gaming-mode" ''
|
||||||
|
sudo ${pkgs.systemd}/bin/systemctl start to-gaming-mode.service
|
||||||
'';
|
'';
|
||||||
};
|
in {
|
||||||
|
services.displayManager.sddm = {
|
||||||
gaming-mode = pkgs.writeShellScriptBin "gaming-mode" ''
|
|
||||||
sudo ${pkgs.systemd}/bin/systemctl start to-gaming-mode.service
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
services.displayManager.sddm = {
|
|
||||||
enable = true;
|
|
||||||
autoLogin.relogin = true;
|
|
||||||
|
|
||||||
wayland = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
compositorCommand = "kwin";
|
autoLogin.relogin = true;
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Sets the default session at launch
|
wayland = {
|
||||||
systemd.services."set-session" = {
|
enable = true;
|
||||||
wantedBy = ["multi-user.target"];
|
compositorCommand = "kwin";
|
||||||
before = ["display-manager.service"];
|
|
||||||
|
|
||||||
path = [switch-session];
|
|
||||||
|
|
||||||
script = ''
|
|
||||||
switch-session "${defaultSession}"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allows switching to gaming mode
|
|
||||||
systemd.services."to-gaming-mode" = {
|
|
||||||
wantedBy = mkForce [];
|
|
||||||
|
|
||||||
path = [switch-session];
|
|
||||||
|
|
||||||
script = ''
|
|
||||||
switch-session "gamescope-wayland"
|
|
||||||
systemctl restart display-manager
|
|
||||||
sleep 10
|
|
||||||
switch-session "${defaultSession}"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Make it so we don't need root to switch to gaming mode
|
|
||||||
security.sudo.extraRules = [
|
|
||||||
{
|
|
||||||
users = [mainUser];
|
|
||||||
groups = [100];
|
|
||||||
commands = [
|
|
||||||
{
|
|
||||||
command = "${pkgs.systemd}/bin/systemctl start to-gaming-mode.service";
|
|
||||||
options = ["SETENV" "NOPASSWD"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.${mainUser} = {
|
|
||||||
# Add desktop entry to make it GUI friendly
|
|
||||||
xdg.desktopEntries."Gaming Mode" = {
|
|
||||||
name = "Gaming Mode";
|
|
||||||
exec = getExe gaming-mode;
|
|
||||||
icon = "steam";
|
|
||||||
terminal = false;
|
|
||||||
type = "Application";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file."Desktop/Gaming Mode.desktop".source =
|
|
||||||
(
|
|
||||||
findFirst
|
|
||||||
(x: x.meta.name == "Gaming Mode.desktop") {}
|
|
||||||
config.home-manager.users.mariah.home.packages
|
|
||||||
)
|
|
||||||
+ "/share/applications/Gaming Mode.desktop";
|
|
||||||
|
|
||||||
# Fix remote control prompt showing up everytime
|
|
||||||
xdg.configFile = let
|
|
||||||
mkAutostart = name: flags: {
|
|
||||||
"autostart/${name}.desktop".text = "[Desktop Entry]\nType=Application\nExec=${name} ${flags}";
|
|
||||||
};
|
};
|
||||||
in (
|
};
|
||||||
# Needs xdg-desktop-portal-kde patch provided by `self.overlays.xdg-desktop-portal-kde`
|
|
||||||
{"plasmaremotedesktoprc".text = "[Sharing]\nUnattended=true";}
|
# Sets the default session at launch
|
||||||
// (mkAutostart "krfb" "--nodialog %c")
|
systemd.services."set-session" = {
|
||||||
// (mkAutostart "steam" "-silent %U")
|
wantedBy = ["multi-user.target"];
|
||||||
);
|
before = ["display-manager.service"];
|
||||||
|
|
||||||
|
path = [switch-session];
|
||||||
|
|
||||||
|
script = ''
|
||||||
|
switch-session "${defaultSession}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allows switching to gaming mode
|
||||||
|
systemd.services."to-gaming-mode" = {
|
||||||
|
wantedBy = mkForce [];
|
||||||
|
|
||||||
|
path = [switch-session];
|
||||||
|
|
||||||
|
script = ''
|
||||||
|
switch-session "gamescope-wayland"
|
||||||
|
systemctl restart display-manager
|
||||||
|
sleep 10
|
||||||
|
switch-session "${defaultSession}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Make it so we don't need root to switch to gaming mode
|
||||||
|
security.sudo.extraRules = [
|
||||||
|
{
|
||||||
|
users = [mainUser];
|
||||||
|
groups = [100];
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
command = "${pkgs.systemd}/bin/systemctl start to-gaming-mode.service";
|
||||||
|
options = ["SETENV" "NOPASSWD"];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.${mainUser} = {
|
||||||
|
# Add desktop entry to make it GUI friendly
|
||||||
|
xdg.desktopEntries."Gaming Mode" = {
|
||||||
|
name = "Gaming Mode";
|
||||||
|
exec = getExe gaming-mode;
|
||||||
|
icon = "steam";
|
||||||
|
terminal = false;
|
||||||
|
type = "Application";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file."Desktop/Gaming Mode.desktop".source =
|
||||||
|
(
|
||||||
|
findFirst
|
||||||
|
(x: x.meta.name == "Gaming Mode.desktop") {}
|
||||||
|
config.home-manager.users.mariah.home.packages
|
||||||
|
)
|
||||||
|
+ "/share/applications/Gaming Mode.desktop";
|
||||||
|
|
||||||
|
# Fix remote control prompt showing up everytime
|
||||||
|
xdg.configFile = let
|
||||||
|
mkAutostart = name: flags: {
|
||||||
|
"autostart/${name}.desktop".text = "[Desktop Entry]\nType=Application\nExec=${name} ${flags}";
|
||||||
|
};
|
||||||
|
in (
|
||||||
|
# Needs xdg-desktop-portal-kde patch provided by `self.overlays.xdg-desktop-portal-kde`
|
||||||
|
{"plasmaremotedesktoprc".text = "[Sharing]\nUnattended=true";}
|
||||||
|
// (mkAutostart "krfb" "--nodialog %c")
|
||||||
|
// (mkAutostart "steam" "-silent %U")
|
||||||
|
);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# For accurate stack trace
|
||||||
|
_file = ./session-switching.nix;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,72 +4,77 @@ defaultSession: {
|
||||||
pkgs,
|
pkgs,
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
inherit (config.vars) mainUser;
|
config = let
|
||||||
|
inherit (config.vars) mainUser;
|
||||||
|
|
||||||
cfg = config.programs.steam;
|
cfg = config.programs.steam;
|
||||||
in {
|
in {
|
||||||
# Normal Steam Stuff
|
# Normal Steam Stuff
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
protontricks.enable = true;
|
protontricks.enable = true;
|
||||||
|
|
||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
extraCompatPackages = [
|
extraCompatPackages = [
|
||||||
self.packages.${pkgs.system}.proton-ge-latest
|
self.packages.${pkgs.system}.proton-ge-latest
|
||||||
];
|
];
|
||||||
};
|
|
||||||
|
|
||||||
# Jovian Steam settings
|
|
||||||
jovian.steam = {
|
|
||||||
# Steam > Settings > System > Enable Developer Mode
|
|
||||||
# Steam > Developer > CEF Remote Debugging
|
|
||||||
enable = true;
|
|
||||||
user = mainUser;
|
|
||||||
|
|
||||||
environment = {
|
|
||||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS =
|
|
||||||
lib.makeSearchPathOutput
|
|
||||||
"steamcompattool"
|
|
||||||
""
|
|
||||||
cfg.extraCompatPackages;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
desktopSession = defaultSession;
|
# Jovian Steam settings
|
||||||
};
|
jovian.steam = {
|
||||||
|
# Steam > Settings > System > Enable Developer Mode
|
||||||
|
# Steam > Developer > CEF Remote Debugging
|
||||||
|
enable = true;
|
||||||
|
user = mainUser;
|
||||||
|
|
||||||
# Decky settings
|
environment = {
|
||||||
jovian.decky-loader = {
|
STEAM_EXTRA_COMPAT_TOOLS_PATHS =
|
||||||
enable = true;
|
lib.makeSearchPathOutput
|
||||||
user = mainUser;
|
"steamcompattool"
|
||||||
stateDir = "/home/${mainUser}/.local/share/decky"; # Keep scoped to user
|
""
|
||||||
# https://github.com/Jovian-Experiments/Jovian-NixOS/blob/1171169117f63f1de9ef2ea36efd8dcf377c6d5a/modules/decky-loader.nix#L80-L84
|
cfg.extraCompatPackages;
|
||||||
|
};
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
desktopSession = defaultSession;
|
||||||
# Generic packages
|
};
|
||||||
curl
|
|
||||||
unzip
|
|
||||||
util-linux
|
|
||||||
gnugrep
|
|
||||||
|
|
||||||
readline.out
|
# Decky settings
|
||||||
procps
|
jovian.decky-loader = {
|
||||||
pciutils
|
enable = true;
|
||||||
libpulseaudio
|
user = mainUser;
|
||||||
|
stateDir = "/home/${mainUser}/.local/share/decky"; # Keep scoped to user
|
||||||
|
# https://github.com/Jovian-Experiments/Jovian-NixOS/blob/1171169117f63f1de9ef2ea36efd8dcf377c6d5a/modules/decky-loader.nix#L80-L84
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
# Generic packages
|
||||||
|
curl
|
||||||
|
unzip
|
||||||
|
util-linux
|
||||||
|
gnugrep
|
||||||
|
|
||||||
|
readline.out
|
||||||
|
procps
|
||||||
|
pciutils
|
||||||
|
libpulseaudio
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Takes way too long to shutdown
|
||||||
|
systemd.services."decky-loader".serviceConfig.TimeoutStopSec = "5";
|
||||||
|
|
||||||
|
# Misc Packages
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.steam-rom-manager
|
||||||
|
self.packages.${pkgs.system}.protonhax
|
||||||
|
|
||||||
|
# FIXME:Ryujinx ACNH crashes on OpenGL AND Vulkan
|
||||||
|
# https://github.com/Ryujinx/Ryujinx/issues/6993
|
||||||
|
# https://github.com/Ryujinx/Ryujinx/issues/6708
|
||||||
|
self.packages.${pkgs.system}.yuzu
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Takes way too long to shutdown
|
# For accurate stack trace
|
||||||
systemd.services."decky-loader".serviceConfig.TimeoutStopSec = "5";
|
_file = ./steam.nix;
|
||||||
|
|
||||||
# Misc Packages
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.steam-rom-manager
|
|
||||||
self.packages.${pkgs.system}.protonhax
|
|
||||||
|
|
||||||
# FIXME:Ryujinx ACNH crashes on OpenGL AND Vulkan
|
|
||||||
# https://github.com/Ryujinx/Ryujinx/issues/6993
|
|
||||||
# https://github.com/Ryujinx/Ryujinx/issues/6708
|
|
||||||
self.packages.${pkgs.system}.yuzu
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue