refactor(steam): migrate to options module

This commit is contained in:
Michael Thomas 2024-06-27 17:46:14 -04:00
parent 7ed2e62180
commit 1251761da2
4 changed files with 22 additions and 9 deletions

View File

@ -93,8 +93,6 @@ in {
++ [ ++ [
../modules/common.nix ../modules/common.nix
../modules/containers.nix ../modules/containers.nix
../modules/applications/libreoffice
../modules/applications/steam
../machines/terra/configuration.nix ../machines/terra/configuration.nix
]; ];

View File

@ -49,6 +49,7 @@
my.hyprland.enable = true; my.hyprland.enable = true;
my.libreoffice.enable = true; my.libreoffice.enable = true;
my.steam.enable = true;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.michael = { users.users.michael = {

View File

@ -1,7 +0,0 @@
{pkgs, ...}: {
programs.steam = {
enable = true;
package = pkgs.unstable.steam;
gamescopeSession.enable = true;
};
}

21
nixos/steam/default.nix Normal file
View File

@ -0,0 +1,21 @@
{
pkgs,
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.my.steam;
in {
options.my.steam = {
enable = mkEnableOption "steam";
};
config = mkIf cfg.enable {
programs.steam = {
enable = true;
package = pkgs.unstable.steam;
gamescopeSession.enable = true;
};
};
}