diff --git a/nix/configuration/configuration.nix b/nix/configuration/configuration.nix index 1d1ee65..86c9597 100644 --- a/nix/configuration/configuration.nix +++ b/nix/configuration/configuration.nix @@ -59,6 +59,7 @@ ./roles/kodi ./roles/ansible ./roles/bluetooth + ./roles/sm64ex ]; nix.settings.experimental-features = [ diff --git a/nix/configuration/hosts/odo/default.nix b/nix/configuration/hosts/odo/default.nix index 9d30f9e..e102bcd 100644 --- a/nix/configuration/hosts/odo/default.nix +++ b/nix/configuration/hosts/odo/default.nix @@ -65,4 +65,6 @@ me.wireguard.deactivated = [ "wgf" ]; me.zrepl.enable = true; me.zsh.enable = true; + + me.sm64ex.enable = true; } diff --git a/nix/configuration/roles/sm64ex/default.nix b/nix/configuration/roles/sm64ex/default.nix new file mode 100644 index 0000000..9705955 --- /dev/null +++ b/nix/configuration/roles/sm64ex/default.nix @@ -0,0 +1,41 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ ]; + + options.me = { + sm64ex.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install sm64ex."; + }; + }; + + config = lib.mkIf config.me.sm64ex.enable ( + lib.mkMerge [ + { + allowedUnfree = [ "sm64ex" ]; + } + (lib.mkIf config.me.graphical { + environment.systemPackages = with pkgs; [ + sm64ex + ]; + + nixpkgs.overlays = [ + (final: prev: { + sm4ex = prev.sm64ex.override { + baseRom.name = "SuperMario64.z64"; + }; + }) + ]; + + }) + ] + ); +}