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,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
|
@ -57,8 +56,7 @@ in {
|
|||
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "steamos";
|
||||
themePackages = [pkgs.steamdeck-hw-theme];
|
||||
theme = "bgrt";
|
||||
};
|
||||
|
||||
services.kmscon.enable = true;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{pkgs, ...}: let
|
||||
# switch to wayland when possible
|
||||
defaultSession = "plasma";
|
||||
in {
|
||||
imports = [
|
||||
|
|
|
@ -3,108 +3,113 @@ defaultSession: {
|
|||
lib,
|
||||
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 {
|
||||
name = "switch-session";
|
||||
switch-session = pkgs.writeShellApplication {
|
||||
name = "switch-session";
|
||||
|
||||
text = ''
|
||||
mkdir -p /etc/sddm.conf.d
|
||||
text = ''
|
||||
mkdir -p /etc/sddm.conf.d
|
||||
|
||||
cat <<EOF | tee /etc/sddm.conf.d/autologin.conf
|
||||
[Autologin]
|
||||
User=${mainUser}
|
||||
Session=$1
|
||||
Relogin=true
|
||||
EOF
|
||||
cat <<EOF | tee /etc/sddm.conf.d/autologin.conf
|
||||
[Autologin]
|
||||
User=${mainUser}
|
||||
Session=$1
|
||||
Relogin=true
|
||||
EOF
|
||||
'';
|
||||
};
|
||||
|
||||
gaming-mode = pkgs.writeShellScriptBin "gaming-mode" ''
|
||||
sudo ${pkgs.systemd}/bin/systemctl start to-gaming-mode.service
|
||||
'';
|
||||
};
|
||||
|
||||
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 = {
|
||||
in {
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
compositorCommand = "kwin";
|
||||
};
|
||||
};
|
||||
autoLogin.relogin = true;
|
||||
|
||||
# Sets the default session at launch
|
||||
systemd.services."set-session" = {
|
||||
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}";
|
||||
wayland = {
|
||||
enable = true;
|
||||
compositorCommand = "kwin";
|
||||
};
|
||||
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")
|
||||
);
|
||||
};
|
||||
|
||||
# Sets the default session at launch
|
||||
systemd.services."set-session" = {
|
||||
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,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (config.vars) mainUser;
|
||||
}: {
|
||||
config = let
|
||||
inherit (config.vars) mainUser;
|
||||
|
||||
cfg = config.programs.steam;
|
||||
in {
|
||||
# Normal Steam Stuff
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
protontricks.enable = true;
|
||||
cfg = config.programs.steam;
|
||||
in {
|
||||
# Normal Steam Stuff
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
protontricks.enable = true;
|
||||
|
||||
remotePlay.openFirewall = true;
|
||||
extraCompatPackages = [
|
||||
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;
|
||||
remotePlay.openFirewall = true;
|
||||
extraCompatPackages = [
|
||||
self.packages.${pkgs.system}.proton-ge-latest
|
||||
];
|
||||
};
|
||||
|
||||
desktopSession = defaultSession;
|
||||
};
|
||||
# Jovian Steam settings
|
||||
jovian.steam = {
|
||||
# Steam > Settings > System > Enable Developer Mode
|
||||
# Steam > Developer > CEF Remote Debugging
|
||||
enable = true;
|
||||
user = mainUser;
|
||||
|
||||
# Decky settings
|
||||
jovian.decky-loader = {
|
||||
enable = true;
|
||||
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
|
||||
environment = {
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS =
|
||||
lib.makeSearchPathOutput
|
||||
"steamcompattool"
|
||||
""
|
||||
cfg.extraCompatPackages;
|
||||
};
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
# Generic packages
|
||||
curl
|
||||
unzip
|
||||
util-linux
|
||||
gnugrep
|
||||
desktopSession = defaultSession;
|
||||
};
|
||||
|
||||
readline.out
|
||||
procps
|
||||
pciutils
|
||||
libpulseaudio
|
||||
# Decky settings
|
||||
jovian.decky-loader = {
|
||||
enable = true;
|
||||
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
|
||||
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
|
||||
];
|
||||
# For accurate stack trace
|
||||
_file = ./steam.nix;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue