games: Move to separate module

upower
Simon Bruder 2021-08-06 18:55:10 +02:00
parent 3acc1eb0ce
commit 49aa48366a
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
2 changed files with 24 additions and 16 deletions

View File

@ -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

23
modules/games.nix Normal file
View File

@ -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 { };
}