diff options
| -rw-r--r-- | hosts/c-pc/home.nix | 6 | ||||
| -rw-r--r-- | snowfall/homes/x86_64-linux/c/default.nix | 2 | ||||
| -rw-r--r-- | snowfall/modules/home/apps/prismlauncher/default.nix | 35 | ||||
| -rw-r--r-- | snowfall/modules/home/suites/gaming/default.nix | 17 |
4 files changed, 54 insertions, 6 deletions
diff --git a/hosts/c-pc/home.nix b/hosts/c-pc/home.nix index 9a95eae..f6dc268 100644 --- a/hosts/c-pc/home.nix +++ b/hosts/c-pc/home.nix @@ -43,7 +43,6 @@ ".local/share/Anki2" ".local/share/lutris" - ".local/share/PrismLauncher" ".config/nicotine" ".local/share/nicotine" @@ -77,15 +76,10 @@ anki-bin obsidian - prismlauncher #TODO: latest update broke # jetbrains.idea-community ]; - home.file = { - ".0b".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/share/PrismLauncher/instances/0b/.minecraft"; - }; - home.stateVersion = "23.11"; } diff --git a/snowfall/homes/x86_64-linux/c/default.nix b/snowfall/homes/x86_64-linux/c/default.nix index 10a961b..da64583 100644 --- a/snowfall/homes/x86_64-linux/c/default.nix +++ b/snowfall/homes/x86_64-linux/c/default.nix @@ -9,10 +9,12 @@ with lib; with lib.${namespace}; { desktop.enable = true; dev.enable = true; media.enable = true; + gaming.enable = true; misc.enable = true; }; apps.discord.enable = true; + apps.prismlauncher.extra.rusherhack.enable = true; tools.git = { name = "Caroline Larimore"; diff --git a/snowfall/modules/home/apps/prismlauncher/default.nix b/snowfall/modules/home/apps/prismlauncher/default.nix new file mode 100644 index 0000000..c6830ba --- /dev/null +++ b/snowfall/modules/home/apps/prismlauncher/default.nix @@ -0,0 +1,35 @@ +{ options, config, lib, pkgs, namespace, ... }: + +with lib; with lib.${namespace}; let + cfg = config.${namespace}.apps.prismlauncher; + impermanence = config.${namespace}.impermanence; +in { + options.${namespace}.apps.prismlauncher = with types; { + enable = mkEnableOption "prismlauncher"; + + extra = { + rusherhack.enable = mkEnableOption "rusherhack"; + }; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + prismlauncher + ]; + + home.persistence.${impermanence.location} = { + directories = [ + ".local/share/PrismLauncher" + ] ++ optionals cfg.extra.rusherhack.enable [ + #TODO: migrate to proper a secrets management setup, eg agenix/sops-nix + ".rusherhack" + ]; + }; + + home.file = { + "Links/PrismLauncher Instances".source = config.lib.file.mkOutOfStoreSymlink ( + "${config.home.homeDirectory}/.local/share/PrismLauncher/instances" + ); + }; + }; +} diff --git a/snowfall/modules/home/suites/gaming/default.nix b/snowfall/modules/home/suites/gaming/default.nix new file mode 100644 index 0000000..201e650 --- /dev/null +++ b/snowfall/modules/home/suites/gaming/default.nix @@ -0,0 +1,17 @@ +{ options, config, lib, namespace, ... }: + +with lib; with lib.${namespace}; let + cfg = config.${namespace}.suites.gaming; +in { + options.${namespace}.suites.gaming = with types; { + enable = mkEnableOption "gaming"; + }; + + config = mkIf cfg.enable { + cxl = { + apps = { + prismlauncher.enable = true; + }; + }; + }; +} |