From 8b8aa68811101266ec62b93448cfd4f8a8817d7a Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Wed, 20 Nov 2024 23:36:29 -0600 Subject: [PATCH] modularize steam --- home/modules/default.nix | 1 + home/modules/steam/default.nix | 21 +++++++++++++++++++ .../apps => modules}/steam/package.nix | 0 .../fabian@posixlycorrect/apps/default.nix | 1 - .../apps/steam/default.nix | 14 ------------- .../fabian@posixlycorrect/default.nix | 11 +++++++--- 6 files changed, 30 insertions(+), 18 deletions(-) create mode 100644 home/modules/steam/default.nix rename home/{platforms/fabian@posixlycorrect/apps => modules}/steam/package.nix (100%) delete mode 100644 home/platforms/fabian@posixlycorrect/apps/steam/default.nix diff --git a/home/modules/default.nix b/home/modules/default.nix index 8b1c228..00d0787 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -8,5 +8,6 @@ ./terminal ./neovim.nix ./baseline.nix + ./steam ]; } diff --git a/home/modules/steam/default.nix b/home/modules/steam/default.nix new file mode 100644 index 0000000..2360e6b --- /dev/null +++ b/home/modules/steam/default.nix @@ -0,0 +1,21 @@ +{ + pkgs, + lib, + config, + ... +}: +with lib; let + cfg = config.local.apps.steam; +in { + options.local.apps.steam = { + enable = mkEnableOption "Steam settings"; + }; + config = mkIf cfg.enable { + home.packages = [ + (pkgs.callPackage ./package.nix {}) + pkgs.protonup + pkgs.winetricks + pkgs.protontricks + ]; + }; +} diff --git a/home/platforms/fabian@posixlycorrect/apps/steam/package.nix b/home/modules/steam/package.nix similarity index 100% rename from home/platforms/fabian@posixlycorrect/apps/steam/package.nix rename to home/modules/steam/package.nix diff --git a/home/platforms/fabian@posixlycorrect/apps/default.nix b/home/platforms/fabian@posixlycorrect/apps/default.nix index 9b071f6..cd3d789 100644 --- a/home/platforms/fabian@posixlycorrect/apps/default.nix +++ b/home/platforms/fabian@posixlycorrect/apps/default.nix @@ -5,7 +5,6 @@ ... }: { imports = [ - ./steam ]; home.packages = with pkgs; [ diff --git a/home/platforms/fabian@posixlycorrect/apps/steam/default.nix b/home/platforms/fabian@posixlycorrect/apps/steam/default.nix deleted file mode 100644 index 8ba18b9..0000000 --- a/home/platforms/fabian@posixlycorrect/apps/steam/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -with lib; { - home.packages = [ - (pkgs.callPackage ./package.nix {}) - pkgs.protonup - pkgs.winetricks - pkgs.protontricks - ]; -} diff --git a/home/platforms/fabian@posixlycorrect/default.nix b/home/platforms/fabian@posixlycorrect/default.nix index 60cf2d3..6480312 100644 --- a/home/platforms/fabian@posixlycorrect/default.nix +++ b/home/platforms/fabian@posixlycorrect/default.nix @@ -12,9 +12,14 @@ ./isolation.nix ]; - local.baseline.enable = true; - local.apps.terminal.enable = true; - local.apps.neovim.enable = true; + local = { + baseline.enable = true; + apps = { + terminal.enable = true; + neovim.enable = true; + steam.enable = true; + }; + }; nix.registry = { "system".to = {