nintendo switch flake

This commit is contained in:
2025-02-09 02:57:19 -06:00
parent 42db1e1ab5
commit cac6af6c06
4 changed files with 81 additions and 2 deletions

View File

@@ -7,8 +7,17 @@
}:
{
imports = [ inputs.nix-gaming.nixosModules.platformOptimizations ];
options.my.apps.gaming.enable = lib.mkEnableOption "enable";
options.my.apps = {
gaming.enable = lib.mkEnableOption "enable";
switch.enable = lib.mkEnableOption "enable";
};
config = lib.mkIf config.my.apps.gaming.enable {
sops.secrets.switch-presence = {
sopsFile = ../../secrets/env.yaml;
format = "dotenv";
owner = config.users.users.jawz.name;
inherit (config.users.users.jawz) group;
};
programs = {
gamemode.enable = true;
steam = {
@@ -19,6 +28,13 @@
platformOptimizations.enable = true;
};
};
services = lib.mkIf config.my.apps.switch.enable {
switch-boot.enable = true;
switch-presence = {
enable = true;
environmentFile = config.sops.secrets.switch-presence.path;
};
};
users.users.jawz.packages = builtins.attrValues {
inherit (pkgs)
shipwright # zelda OoT port