feat: tf2.nix
This commit is contained in:
24
modules/home/tf2.nix
Normal file
24
modules/home/tf2.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.tf2;
|
||||
in {
|
||||
options.tf2 = {
|
||||
enable = lib.mkEnableOption "Team Fortress 2 configuration";
|
||||
packages = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable
|
||||
(let gameDir = ".local/share/Steam/steamapps/common/Team Fortress 2";
|
||||
in {
|
||||
home.file."tf" = {
|
||||
recursive = true;
|
||||
source = pkgs.symlinkJoin {
|
||||
name = "tf2-files";
|
||||
paths = cfg.packages;
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user