Skip to content

Commit

Permalink
steam: use setuid bubblewrap
Browse files Browse the repository at this point in the history
  • Loading branch information
K900 committed Oct 11, 2023
1 parent 73ce8be commit 7dd743d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 34 deletions.
5 changes: 5 additions & 0 deletions modules/steam/steam.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ in
}
});
'';

# Steam will run some helper tools with pkexec, which needs setuid,
# which means bubblewrap itself also needs to be setuid.
# Requires https://github.com/NixOS/nixpkgs/pull/260404.
security.bubblewrap.allowSetuid = true;
}
]);
}
4 changes: 0 additions & 4 deletions pkgs/jovian-stubs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ stdenv.mkDerivation {
name = "jovian-stubs";

buildCommand = ''
install -D -m 755 ${./jupiter-biosupdate} $out/bin/jupiter-biosupdate
install -D -m 755 ${./steamos-factory-reset-config} $out/bin/steamos-factory-reset-config
install -D -m 755 ${./steamos-reboot} $out/bin/steamos-reboot
install -D -m 755 ${./steamos-select-branch} $out/bin/steamos-select-branch
install -D -m 755 ${./steamos-update} $out/bin/steamos-update
install -D -m 755 ${./pkexec} $out/bin/pkexec
install -D -m 755 ${./sudo} $out/bin/sudo
'';
}
5 changes: 0 additions & 5 deletions pkgs/jovian-stubs/jupiter-biosupdate

This file was deleted.

4 changes: 0 additions & 4 deletions pkgs/jovian-stubs/pkexec

This file was deleted.

18 changes: 0 additions & 18 deletions pkgs/jovian-stubs/sudo

This file was deleted.

4 changes: 1 addition & 3 deletions pkgs/steam-jupiter/fhsenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ let
dmidecode
jovian-stubs
sessionSwitcher

# FIXME: figure out how to fix pkexec (needs SUID in fhsenv, see https://github.com/NixOS/nixpkgs/issues/69338)
# and readd steamos-polkit-helpers
steamos-polkit-helpers
];
extraProfile = (args.extraProfile or "") + ''
export PATH=${jovian-stubs}/bin:$PATH
Expand Down

0 comments on commit 7dd743d

Please sign in to comment.