forked from poz/niksos
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{
|
|
config,
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: with lib; let
|
|
cfg = config.myOptions.programs.osu;
|
|
username = config.myOptions.other.system.username;
|
|
in {
|
|
options.myOptions.programs.osu = {
|
|
enable = mkEnableOption "osu!";
|
|
enableStable = mkEnableOption "osu!stable";
|
|
};
|
|
|
|
config = mkIf (cfg.enable || cfg.enableStable) {
|
|
nix.settings = {
|
|
substituters = [
|
|
"https://nix-gaming.cachix.org"
|
|
];
|
|
trusted-public-keys = [
|
|
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
|
];
|
|
};
|
|
|
|
home-manager.users.${username} = {
|
|
home.packages = with inputs.nix-gaming.packages.${pkgs.system}; [
|
|
(mkIf cfg.enable
|
|
osu-lazer-bin)
|
|
(mkIf cfg.enableStable
|
|
(osu-stable.override {
|
|
preCommands = ''
|
|
export DRI_PRIME=1
|
|
'';
|
|
})
|
|
)
|
|
];
|
|
};
|
|
};
|
|
}
|