25 lines
544 B
Nix
25 lines
544 B
Nix
{ 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;
|
|
};
|
|
};
|
|
});
|
|
}
|