aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-06-13 17:12:45 +0200
committerKarel Kočí <cynerd@email.cz>2022-06-13 17:12:45 +0200
commit0719670abd747e1bfecf89353fed01f25b0af296 (patch)
tree63c89dd11dd62cf5f476b99e6551c22933acbbd2
parent15bd5a0e017bb1635ca82e013bf6c3d070b37572 (diff)
downloadnixos-personal-0719670abd747e1bfecf89353fed01f25b0af296.tar.gz
nixos-personal-0719670abd747e1bfecf89353fed01f25b0af296.tar.bz2
nixos-personal-0719670abd747e1bfecf89353fed01f25b0af296.zip
nixos/modules: add gaming
-rw-r--r--nixos/machine/binky.nix2
-rw-r--r--nixos/modules/default.nix1
-rw-r--r--nixos/modules/gaming.nix32
3 files changed, 35 insertions, 0 deletions
diff --git a/nixos/machine/binky.nix b/nixos/machine/binky.nix
index 26ffe1d..595a21d 100644
--- a/nixos/machine/binky.nix
+++ b/nixos/machine/binky.nix
@@ -58,6 +58,8 @@ with lib;
config = "config /run/secrets/old.ovpn";
};
+ cynerd.gaming = true;
+
};
}
diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix
index fe401df..1077dc7 100644
--- a/nixos/modules/default.nix
+++ b/nixos/modules/default.nix
@@ -2,6 +2,7 @@ nixpkgs: {
cynerd-compile = import ./compile.nix;
cynerd-desktop = import ./desktop.nix;
cynerd-develop = import ./develop.nix nixpkgs;
+ cynerd-gaming = import ./gaming.nix;
cynerd-generic = import ./generic.nix;
cynerd-hardware = import ./hardware.nix;
cynerd-hosts = import ./hosts.nix;
diff --git a/nixos/modules/gaming.nix b/nixos/modules/gaming.nix
new file mode 100644
index 0000000..1065de7
--- /dev/null
+++ b/nixos/modules/gaming.nix
@@ -0,0 +1,32 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+
+ cnf = config.cynerd.gaming;
+
+in {
+
+ options = {
+ cynerd.gaming = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Enable gaming";
+ };
+ };
+
+ config = mkIf cnf {
+ cynerd.desktop.enable = true;
+
+ environment.systemPackages = with pkgs; [
+ minigalaxy
+ ];
+
+ programs.steam = {
+ enable = true;
+ remotePlay.openFirewall = true;
+ dedicatedServer.openFirewall = true;
+ };
+
+ };
+}