home/games: Add module and option

This commit is contained in:
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 = { sbruder = {
cpu.intel.enable = true; cpu.intel.enable = true;
games.enable = true;
gpu.intel.enable = true; gpu.intel.enable = true;
gui.enable = true; gui.enable = true;
libvirt.enable = true; libvirt.enable = true;

View file

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

View file

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

View file

@ -26,6 +26,7 @@ in
"vista-fonts" "vista-fonts"
"wallpaper-unfree" # defined in users/simon/modules/sway.nix "wallpaper-unfree" # defined in users/simon/modules/sway.nix
] ++ lib.optionals cfg.allowSoftware [ ] ++ 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 "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, ... }: { home-manager.users.simon = { lib, pkgs, ... }: {
options.sbruder = { options.sbruder = {
gui.enable = inheritOption "sbruder.gui.enable"; gui.enable = inheritOption "sbruder.gui.enable";
games.enable = inheritOption "sbruder.games.enable";
unfree = { unfree = {
allowAssets = inheritOption "sbruder.unfree.allowAssets"; allowAssets = inheritOption "sbruder.unfree.allowAssets";
allowSoftware = inheritOption "sbruder.unfree.allowSoftware"; allowSoftware = inheritOption "sbruder.unfree.allowSoftware";

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./alacritty.nix ./alacritty.nix
./anki.nix ./anki.nix
./games.nix
./git.nix ./git.nix
./gpg.nix ./gpg.nix
./gtk.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;
}