整理一些packages

This commit is contained in:
陈浩南 2023-07-18 13:55:24 +08:00
parent 9e52369fd0
commit 11e6287c26
3 changed files with 31 additions and 6 deletions

View File

@ -143,6 +143,7 @@
./modules/fileSystems ./modules/fileSystems
./modules/kernel ./modules/kernel
./modules/hardware ./modules/hardware
./modules/packages
(inputs: { config.nixos = (inputs: { config.nixos =
{ {
fileSystems = fileSystems =
@ -177,6 +178,10 @@
bluetooth.enable = true; bluetooth.enable = true;
joystick.enable = true; joystick.enable = true;
}; };
packages =
{
packages = [ "genshin-impact" "honkers-star-rail" ];
};
};} };}
) )

View File

@ -0,0 +1,25 @@
inputs:
{
options.nixos.packages = let inherit (inputs.lib) mkOption types; in
{
packages = mkOption { default = []; type = types.listOf (types.enum
[
# games
"genshin-impact" "honkers-star-rail"
]); };
};
config =
{
programs = {}
// (
if builtins.elem "genshin-impact" inputs.config.nixos.packages.packages
then { anime-game-launcher.enable = true; }
else {}
)
// (
if builtins.elem "honkers-star-rail" inputs.config.nixos.packages.packages
then { honkers-railway-launcher.enable = true; }
else {}
);
};
}

View File

@ -3,11 +3,6 @@ inputs:
config = config =
{ {
environment.systemPackages = [ inputs.config.nur.repos.ataraxiasjel.proton-ge inputs.pkgs.wine ]; environment.systemPackages = [ inputs.config.nur.repos.ataraxiasjel.proton-ge inputs.pkgs.wine ];
programs = programs.steam.enable = true;
{
anime-game-launcher.enable = true;
honkers-railway-launcher.enable = true;
steam.enable = true;
};
}; };
} }