niksos/modules/gui/osu.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

2024-02-14 14:58:07 +01:00
{
config,
2024-02-14 15:00:04 +01:00
inputs,
2024-02-14 14:58:07 +01:00
lib,
pkgs,
...
}: with lib; let
cfg = config.myOptions.programs.osu;
2024-04-14 18:49:29 +02:00
inherit (config.myOptions.other.system) username;
2024-02-14 14:58:07 +01:00
in {
options.myOptions.programs.osu = {
2024-04-05 22:59:32 +02:00
enable = mkEnableOption "osu!";
enableStable = mkEnableOption "osu!stable";
2024-02-14 14:58:07 +01:00
};
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} = {
2024-02-14 14:58:07 +01:00
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
'';
})
)
];
};
};
}