programs: stepmania: sandbox
This commit is contained in:
@@ -13,16 +13,47 @@
|
|||||||
# - https://fitupyourstyle.com/
|
# - https://fitupyourstyle.com/
|
||||||
# allows search by difficulty
|
# allows search by difficulty
|
||||||
# - dl packs from <https://stepmaniaonline.net>
|
# - dl packs from <https://stepmaniaonline.net>
|
||||||
{ ... }:
|
#
|
||||||
|
# N.B.: you MUST launch this from ~/.stepmania-5.1.
|
||||||
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.sane.programs.stepmania;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
sane.programs.stepmania = {
|
sane.programs.stepmania = {
|
||||||
|
sandbox.method = "bwrap";
|
||||||
|
sandbox.wrapperType = "inplace"; #< non-standard packaging; binary lives at $out/stepmania-5.1/stepmania (not even in an /opt dir)
|
||||||
|
sandbox.whitelistAudio = true;
|
||||||
|
sandbox.whitelistDri = true;
|
||||||
|
sandbox.whitelistX = true;
|
||||||
|
sandbox.extraPaths = [
|
||||||
|
# for the pad input (/dev/input/js*)
|
||||||
|
"/dev/input"
|
||||||
|
"/sys/class/input"
|
||||||
|
];
|
||||||
|
|
||||||
persist.byStore.plaintext = [
|
persist.byStore.plaintext = [
|
||||||
".stepmania-5.1/Cache" #< otherwise gotta index all the songs every launch
|
".stepmania-5.1/Cache" #< otherwise gotta index all the songs every launch
|
||||||
".stepmania-5.1/Save"
|
".stepmania-5.1/Save"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# TODO: setup ~/.stepmania-5.1/Themes
|
||||||
fs.".stepmania-5.1/Courses".symlink.target = "/mnt/servo/media/games/stepmania/Courses";
|
fs.".stepmania-5.1/Courses".symlink.target = "/mnt/servo/media/games/stepmania/Courses";
|
||||||
fs.".stepmania-5.1/Songs".symlink.target = "/mnt/servo/media/games/stepmania/Songs";
|
fs.".stepmania-5.1/Songs".symlink.target = "/mnt/servo/media/games/stepmania/Songs";
|
||||||
fs.".stepmania-5.1/stepmania.nix".symlink.target = "../nixos/hosts/common/programs/stepmania.nix";
|
fs.".stepmania-5.1/stepmania.nix".symlink.target = "../nixos/hosts/common/programs/stepmania.nix";
|
||||||
# TODO: setup ~/.stepmania-5.1/Themes
|
|
||||||
|
# stepmania expects the current working directory to be the same directory where all its data resides.
|
||||||
|
# so, we have to link these all in and then the user must launch it from ~/.stepmania-5.1.
|
||||||
|
# TODO: wrap stepmania with a `cd ~/.stepmania-5.1`, and move all these to `~/.local/share/stepmania`
|
||||||
|
fs.".stepmania-5.1/Announcers".symlink.target = "${cfg.package}/stepmania-5.1/Announcers";
|
||||||
|
fs.".stepmania-5.1/BackgroundEffects".symlink.target = "${cfg.package}/stepmania-5.1/BackgroundEffects";
|
||||||
|
fs.".stepmania-5.1/BackgroundTransitions".symlink.target = "${cfg.package}/stepmania-5.1/BackgroundTransitions";
|
||||||
|
fs.".stepmania-5.1/BGAnimations".symlink.target = "${cfg.package}/stepmania-5.1/BGAnimations";
|
||||||
|
fs.".stepmania-5.1/Characters".symlink.target = "${cfg.package}/stepmania-5.1/Characters";
|
||||||
|
fs.".stepmania-5.1/Data".symlink.target = "${cfg.package}/stepmania-5.1/Data";
|
||||||
|
fs.".stepmania-5.1/Docs".symlink.target = "${cfg.package}/stepmania-5.1/Docs";
|
||||||
|
fs.".stepmania-5.1/NoteSkins".symlink.target = "${cfg.package}/stepmania-5.1/NoteSkins";
|
||||||
|
fs.".stepmania-5.1/Scripts".symlink.target = "${cfg.package}/stepmania-5.1/Scripts";
|
||||||
|
fs.".stepmania-5.1/Themes".symlink.target = "${cfg.package}/stepmania-5.1/Themes";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user