From 32ff7f09c79a2833fbc0d824d5f16ad3bef474ce Mon Sep 17 00:00:00 2001 From: ulic-youthlic Date: Mon, 13 Jan 2025 17:29:06 +0800 Subject: [PATCH] move steam config to module --- nixos/configurations/Tytonidae/default.nix | 1 + .../{configurations/Tytonidae => modules}/steam.nix | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) rename nixos/{configurations/Tytonidae => modules}/steam.nix (66%) diff --git a/nixos/configurations/Tytonidae/default.nix b/nixos/configurations/Tytonidae/default.nix index b24209a..2e8d26e 100644 --- a/nixos/configurations/Tytonidae/default.nix +++ b/nixos/configurations/Tytonidae/default.nix @@ -25,6 +25,7 @@ programs = { dae.enable = true; openssh.enable = true; + steam.enable = true; }; }; diff --git a/nixos/configurations/Tytonidae/steam.nix b/nixos/modules/steam.nix similarity index 66% rename from nixos/configurations/Tytonidae/steam.nix rename to nixos/modules/steam.nix index c0b639e..f8a3271 100644 --- a/nixos/configurations/Tytonidae/steam.nix +++ b/nixos/modules/steam.nix @@ -1,6 +1,14 @@ -{ ... }: +{ lib, config, ... }: +let + cfg = config.youthlic.programs.steam; +in { - config = { + options = { + youthlic.programs.steam = { + enable = lib.mkEnableOption "steam"; + }; + }; + config = lib.mkIf cfg.enable { hardware.graphics.enable32Bit = true; programs.steam = { enable = true;