Reorganize repository

This commit is contained in:
Charlotte Van Petegem 2021-07-10 09:03:38 +02:00
parent da1824edb6
commit 0fc6c32a47
No known key found for this signature in database
GPG key ID: 019E764B7184435A
124 changed files with 16295 additions and 1229 deletions

View file

@ -0,0 +1,37 @@
{ config, lib, pkgs, ... }:
{
options = {
chvp.games.zeroad = {
client = lib.mkOption {
default = false;
example = true;
};
server = lib.mkOption {
default = false;
example = true;
};
};
};
config = lib.mkIf (config.chvp.games.zeroad.server || config.chvp.games.zeroad.client) {
chvp.base.zfs.homeLinks = [
{ path = ".config/0ad"; type = "cache"; }
];
# Needs to be here, since a headless server probably doesn't have this enabled yet.
hardware.opengl.enable = true;
home-manager.users.charlotte = { pkgs, ... }: {
home.packages = [ pkgs.zeroad ];
};
networking.firewall = lib.mkIf config.chvp.games.zeroad.server {
allowedTCPPorts = [ 20595 ];
allowedUDPPorts = [ 20595 ];
};
services.xrdp = lib.mkIf config.chvp.games.zeroad.server {
enable = true;
defaultWindowManager = "${pkgs.icewm}/bin/icewm";
};
};
}