From 49aa48366a38f679e4e2855bd08abccfab80a4e0 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 6 Aug 2021 18:55:10 +0200 Subject: [PATCH] games: Move to separate module --- modules/default.nix | 17 +---------------- modules/games.nix | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 16 deletions(-) create mode 100644 modules/games.nix diff --git a/modules/default.nix b/modules/default.nix index 285432d..24d8de9 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -12,22 +12,6 @@ default = true; }; gui.enable = lib.mkEnableOption "gui"; - games = { - enable = lib.mkEnableOption "games"; - performanceIndex = lib.mkOption { - type = lib.types.int; - description = '' - Arbitrary number specifying how powerful the machine is. To be - replaced by taking into account single- and multi-core CPU and GPU - metrics separately should this system not map to my machines in - practice. - - * 2: ~ 2014 ultrabook - * 8: ~ 2016 quad-core workstation with mid-range GPU - ''; - default = 1; - }; - }; }; # All modules are imported but non-essential modules are activated by @@ -37,6 +21,7 @@ ./cups.nix ./docker.nix ./fonts.nix + ./games.nix ./grub.nix ./gui.nix ./initrd-ssh.nix diff --git a/modules/games.nix b/modules/games.nix new file mode 100644 index 0000000..98e9735 --- /dev/null +++ b/modules/games.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.sbruder.games; +in +{ + options.sbruder.games = { + enable = lib.mkEnableOption "games"; + performanceIndex = lib.mkOption { + type = lib.types.int; + description = '' + Arbitrary number specifying how powerful the machine is. To be + replaced by taking into account single- and multi-core CPU and GPU + metrics separately should this system not map to my machines in + practice. + + * 2: ~ 2014 ultrabook + * 8: ~ 2016 quad-core workstation with mid-range GPU + ''; + default = 1; + }; + }; + config = lib.mkIf cfg.enable { }; +}