From 67ad4e2dff186c02d7e14fb9eaf84109a9527acc Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 25 Jan 2025 20:47:48 -0500 Subject: [PATCH] Persist sm64ex save data. --- nix/configuration/roles/sm64ex/default.nix | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/nix/configuration/roles/sm64ex/default.nix b/nix/configuration/roles/sm64ex/default.nix index f8d2404..d8ea66d 100644 --- a/nix/configuration/roles/sm64ex/default.nix +++ b/nix/configuration/roles/sm64ex/default.nix @@ -19,10 +19,9 @@ config = lib.mkIf config.me.sm64ex.enable ( lib.mkMerge [ - { - allowedUnfree = [ "sm64ex" ]; - } (lib.mkIf config.me.graphical { + allowedUnfree = [ "sm64ex" ]; + environment.systemPackages = with pkgs; [ sm64ex ]; @@ -34,6 +33,22 @@ # }; # }) # ]; + + # TODO perhaps install ~/.local/share/sm64ex/sm64config.txt + + environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) { + hideMounts = true; + users.talexander = { + directories = [ + { + directory = ".local/share/sm64ex"; + user = "talexander"; + group = "talexander"; + mode = "0755"; + } + ]; + }; + }; }) ] );