add gaming module

This commit is contained in:
xunuwu 2024-08-27 14:48:55 +00:00
parent 6a9c9276bd
commit 193c64b772
No known key found for this signature in database
3 changed files with 27 additions and 6 deletions

View file

@ -1,5 +1,6 @@
{
imports = [
./develop
./gaming
];
}

View file

@ -15,12 +15,11 @@ in {
};
config = let
config =
conf =
if cfg.enable
then
(cfg
// {
enable = true;
nix.enable = true;
tools.enable = true;
docs.enable = true;
@ -29,16 +28,16 @@ in {
else cfg;
in
lib.mkMerge [
(lib.mkIf config.nix.enable {
(lib.mkIf conf.nix.enable {
home.packages = with pkgs; [nil alejandra];
})
(lib.mkIf config.tools.enable {
(lib.mkIf conf.tools.enable {
home.packages = with pkgs; [tokei];
})
(lib.mkIf config.lsp.c.enable {
(lib.mkIf conf.lsp.c.enable {
home.packages = with pkgs; [clang-tools];
})
(lib.mkIf config.docs.enable {
(lib.mkIf conf.docs.enable {
programs.man.generateCaches = true;
})
];

View file

@ -0,0 +1,21 @@
{
pkgs,
config,
lib,
self,
...
}: let
cfg = config.xun.gaming;
in {
options.xun.gaming = {
krunker.enable = lib.mkEnableOption "krunker";
roblox.sobercookie = lib.mkEnableOption "";
};
config = lib.mkMerge [
(lib.mkIf cfg.krunker.enable {
home.packages = [
self.packages.${pkgs.system}.krunker
];
})
];
}