home/games: Add module and option

pull/30/head
Simon Bruder 2021-01-07 18:29:18 +01:00
parent dfc4bab334
commit 7152112076
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
7 changed files with 11 additions and 0 deletions

View File

@ -9,6 +9,7 @@
sbruder = {
cpu.intel.enable = true;
games.enable = true;
gpu.intel.enable = true;
gui.enable = true;
libvirt.enable = true;

View File

@ -9,6 +9,7 @@
sbruder = {
cpu.intel.enable = true;
games.enable = true;
gpu.amd.enable = true;
gui.enable = true;
libvirt.enable = true;

View File

@ -20,6 +20,7 @@ in
# Options that affect multiple modules
options.sbruder = {
gui.enable = lib.mkEnableOption "gui";
games.enable = lib.mkEnableOption "games";
};
# All modules are imported but non-essential modules are activated by

View File

@ -26,6 +26,7 @@ in
"vista-fonts"
"wallpaper-unfree" # defined in users/simon/modules/sway.nix
] ++ lib.optionals cfg.allowSoftware [
"osu-lazer" # exception: is mostly free (just has one unfree dependency) and runs in container
"p7zip" # exception: rar source code is not free, but available; p7zip with `enableUnfree` includes it
]
));

View File

@ -37,6 +37,7 @@ in
home-manager.users.simon = { lib, pkgs, ... }: {
options.sbruder = {
gui.enable = inheritOption "sbruder.gui.enable";
games.enable = inheritOption "sbruder.games.enable";
unfree = {
allowAssets = inheritOption "sbruder.unfree.allowAssets";
allowSoftware = inheritOption "sbruder.unfree.allowSoftware";

View File

@ -2,6 +2,7 @@
imports = [
./alacritty.nix
./anki.nix
./games.nix
./git.nix
./gpg.nix
./gtk.nix

View File

@ -0,0 +1,5 @@
{ config, lib, pkgs, ... }:
lib.mkIf config.sbruder.games.enable {
home.packages = [ ]
++ lib.optional config.sbruder.unfree.allowSoftware pkgs.unstable.osu-lazer-container;
}