fix(bbsteamie): restart NetworkManager on launch
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
ad8b45a7c7
commit
381fa3d101
1 changed files with 16 additions and 4 deletions
|
@ -8,6 +8,12 @@ defaultSession: {
|
||||||
config = let
|
config = let
|
||||||
inherit (lib) findFirst getExe mkForce;
|
inherit (lib) findFirst getExe mkForce;
|
||||||
|
|
||||||
|
restartNetwork = getExe (pkgs.writeShellApplication {
|
||||||
|
name = "restart-network";
|
||||||
|
runtimeInputs = with pkgs; [systemd];
|
||||||
|
text = "systemctl restart NetworkManager";
|
||||||
|
});
|
||||||
|
|
||||||
switch-session = pkgs.writeShellApplication {
|
switch-session = pkgs.writeShellApplication {
|
||||||
name = "switch-session";
|
name = "switch-session";
|
||||||
|
|
||||||
|
@ -63,16 +69,21 @@ defaultSession: {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Make it so we don't need root to switch to gaming mode
|
|
||||||
security.sudo.extraRules = [
|
security.sudo.extraRules = [
|
||||||
{
|
{
|
||||||
users = [mainUser];
|
users = [mainUser];
|
||||||
groups = [100];
|
groups = [100];
|
||||||
commands = [
|
commands = [
|
||||||
|
# Make it so we don't need root to switch to gaming mode
|
||||||
{
|
{
|
||||||
command = "${pkgs.systemd}/bin/systemctl start to-gaming-mode.service";
|
command = "${pkgs.systemd}/bin/systemctl start to-gaming-mode.service";
|
||||||
options = ["SETENV" "NOPASSWD"];
|
options = ["SETENV" "NOPASSWD"];
|
||||||
}
|
}
|
||||||
|
# Make it so we don't need root to restart the network on launch
|
||||||
|
{
|
||||||
|
command = restartNetwork;
|
||||||
|
options = ["SETENV" "NOPASSWD"];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -101,10 +112,11 @@ defaultSession: {
|
||||||
"autostart/${name}.desktop".text = "[Desktop Entry]\nType=Application\nExec=${name} ${flags}";
|
"autostart/${name}.desktop".text = "[Desktop Entry]\nType=Application\nExec=${name} ${flags}";
|
||||||
};
|
};
|
||||||
in (
|
in (
|
||||||
# Needs xdg-desktop-portal-kde patch provided by `self.overlays.xdg-desktop-portal-kde`
|
(mkAutostart "sudo" restartNetwork)
|
||||||
{"plasmaremotedesktoprc".text = "[Sharing]\nUnattended=true";}
|
|
||||||
// (mkAutostart "krfb" "--nodialog %c")
|
|
||||||
// (mkAutostart "steam" "-silent %U")
|
// (mkAutostart "steam" "-silent %U")
|
||||||
|
# Needs xdg-desktop-portal-kde patch provided by `self.overlays.xdg-desktop-portal-kde`
|
||||||
|
// {"plasmaremotedesktoprc".text = "[Sharing]\nUnattended=true";}
|
||||||
|
// (mkAutostart "krfb" "--nodialog %c")
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue