From 0bec3dbe63067fe0776906b4e1374cc5d4c1aa70 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 10 Feb 2025 01:17:58 -0500 Subject: [PATCH 01/19] Switch to home-manager. --- nix/steam_deck/configuration/flake.lock | 52 ++++++++++++++++++++++++- nix/steam_deck/configuration/flake.nix | 34 ++++++++-------- 2 files changed, 69 insertions(+), 17 deletions(-) diff --git a/nix/steam_deck/configuration/flake.lock b/nix/steam_deck/configuration/flake.lock index bcf4c6b..c67dbab 100644 --- a/nix/steam_deck/configuration/flake.lock +++ b/nix/steam_deck/configuration/flake.lock @@ -1,6 +1,55 @@ { "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixgl": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1713543440, + "narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=", + "owner": "nix-community", + "repo": "nixGL", + "rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixGL", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1660551188, + "narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1739019272, "narHash": "sha256-7Fu7oazPoYCbDzb9k8D/DdbKrC3aU1zlnc39Y8jy/s8=", @@ -18,7 +67,8 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "nixgl": "nixgl", + "nixpkgs": "nixpkgs_2" } } }, diff --git a/nix/steam_deck/configuration/flake.nix b/nix/steam_deck/configuration/flake.nix index 1b41f40..f4f8fe9 100644 --- a/nix/steam_deck/configuration/flake.nix +++ b/nix/steam_deck/configuration/flake.nix @@ -3,10 +3,17 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + # nixgl.url = "github:nix-community/nixGL"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { nixpkgs, + # nixgl, + home-manager, ... }: let @@ -14,23 +21,18 @@ pkgs = nixpkgs.legacyPackages.${system}; in { - packages.${system}.default = pkgs.buildEnv { - name = "default"; - paths = [ - pkgs.emacs - pkgs.mg - pkgs.steam-rom-manager - ]; - }; + defaultPackage.${system} = home-manager.defaultPackage.${system}; + homeConfigurations."deck" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; - formatter.${system} = pkgs.nixfmt-rfc-style; - # formatter.${system} = pkgs.alejandra; + modules = [ ./home.nix ]; + }; }; - # nixConfig = { - # experimental-features = [ - # "nix-command" - # "flakes" - # ]; - # }; + nixConfig = { + experimental-features = [ + "nix-command" + "flakes" + ]; + }; } From 197b8fcced0cfdead38931c810f5270aac299567 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 10 Feb 2025 18:14:18 -0500 Subject: [PATCH 02/19] Add ssh config. --- nix/configuration/roles/ssh/default.nix | 8 +++++ nix/configuration/roles/ssh/files/ssh_config | 34 ++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 nix/configuration/roles/ssh/files/ssh_config diff --git a/nix/configuration/roles/ssh/default.nix b/nix/configuration/roles/ssh/default.nix index a73875c..ba69def 100644 --- a/nix/configuration/roles/ssh/default.nix +++ b/nix/configuration/roles/ssh/default.nix @@ -20,4 +20,12 @@ ]; }; }; + + home-manager.users.talexander = + { pkgs, ... }: + { + home.file.".ssh/config" = { + source = ./files/ssh_config; + }; + }; } diff --git a/nix/configuration/roles/ssh/files/ssh_config b/nix/configuration/roles/ssh/files/ssh_config new file mode 100644 index 0000000..31c0f00 --- /dev/null +++ b/nix/configuration/roles/ssh/files/ssh_config @@ -0,0 +1,34 @@ +Host poudriere + ProxyJump talexander@mrmanager + HostName 10.215.1.203 + +Host controller0 + ProxyJump talexander@mrmanager + HostName 10.215.1.204 + +Host controller1 + ProxyJump talexander@mrmanager + HostName 10.215.1.205 + +Host controller2 + ProxyJump talexander@mrmanager + HostName 10.215.1.206 + +Host worker0 + ProxyJump talexander@mrmanager + HostName 10.215.1.207 + +Host worker1 + ProxyJump talexander@mrmanager + HostName 10.215.1.208 + +Host worker2 + ProxyJump talexander@mrmanager + HostName 10.215.1.209 + +Host brianai + ProxyJump talexander@mrmanager + HostName 10.215.1.215 + +Host * + Compression yes From fea86b00b47c969796973ce27769958124514684 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 13 Feb 2025 17:57:33 -0500 Subject: [PATCH 03/19] Install nixGL to support running graphical programs on non-nixos. --- nix/steam_deck/configuration/flake.lock | 48 ++++++++++++++----------- nix/steam_deck/configuration/flake.nix | 18 +++++++--- nix/steam_deck/configuration/home.nix | 36 +++++++++++++++++++ 3 files changed, 78 insertions(+), 24 deletions(-) create mode 100644 nix/steam_deck/configuration/home.nix diff --git a/nix/steam_deck/configuration/flake.lock b/nix/steam_deck/configuration/flake.lock index c67dbab..4320425 100644 --- a/nix/steam_deck/configuration/flake.lock +++ b/nix/steam_deck/configuration/flake.lock @@ -15,10 +15,32 @@ "type": "github" } }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1739314552, + "narHash": "sha256-ggVf2BclyIW3jexc/uvgsgJH4e2cuG6Nyg54NeXgbFI=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "83bd3a26ac0526ae04fa74df46738bb44b89dcdd", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "nixgl": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { "lastModified": 1713543440, @@ -36,26 +58,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1660551188, - "narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=", + "lastModified": 1739138025, + "narHash": "sha256-M4ilIfGxzbBZuURokv24aqJTbdjPA9K+DtKUzrJaES4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1739019272, - "narHash": "sha256-7Fu7oazPoYCbDzb9k8D/DdbKrC3aU1zlnc39Y8jy/s8=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "fa35a3c8e17a3de613240fea68f876e5b4896aec", + "rev": "b2243f41e860ac85c0b446eadc6930359b294e79", "type": "github" }, "original": { @@ -67,8 +74,9 @@ }, "root": { "inputs": { + "home-manager": "home-manager", "nixgl": "nixgl", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" } } }, diff --git a/nix/steam_deck/configuration/flake.nix b/nix/steam_deck/configuration/flake.nix index f4f8fe9..6d87f5d 100644 --- a/nix/steam_deck/configuration/flake.nix +++ b/nix/steam_deck/configuration/flake.nix @@ -3,7 +3,8 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - # nixgl.url = "github:nix-community/nixGL"; + nixgl.url = "github:nix-community/nixGL"; + nixgl.inputs.nixpkgs.follows = "nixpkgs"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -12,20 +13,29 @@ outputs = { nixpkgs, - # nixgl, + nixgl, home-manager, ... }: let system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = import nixpkgs { + inherit system; + overlays = [ nixgl.overlay ]; + }; in + # pkgs = nixpkgs.legacyPackages.${system}; { defaultPackage.${system} = home-manager.defaultPackage.${system}; homeConfigurations."deck" = home-manager.lib.homeManagerConfiguration { inherit pkgs; - modules = [ ./home.nix ]; + extraSpecialArgs = { inherit nixgl; }; + + modules = [ + ./home.nix + { nixpkgs.overlays = [ nixgl.overlay ]; } + ]; }; }; diff --git a/nix/steam_deck/configuration/home.nix b/nix/steam_deck/configuration/home.nix new file mode 100644 index 0000000..7232bff --- /dev/null +++ b/nix/steam_deck/configuration/home.nix @@ -0,0 +1,36 @@ +# TODO: Optimize for znver2 +{ + config, + pkgs, + nixgl, + ... +}: +{ + home.username = "deck"; + home.homeDirectory = "/home/deck"; + home.stateVersion = "24.11"; + + programs.home-manager.enable = true; + + # enable flakes + nix = { + package = pkgs.nix; + settings.experimental-features = [ + "nix-command" + "flakes" + ]; + }; + + home.packages = with pkgs; [ + steam-rom-manager + pkgs.nixgl.nixGLIntel + (pkgs.nixgl.nixGLCommon pkgs.nixgl.nixGLIntel) + pkgs.nixgl.nixVulkanIntel + ]; + + # This would keep build-time dependencies so I can rebuild while offline. + # nix.settings = { + # keep-outputs = true; + # keep-derivations = true; + # }; +} From ab6f7dbea5e65c0623e3800930cd92f725a4a789 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 13 Feb 2025 18:40:35 -0500 Subject: [PATCH 04/19] Add a role for ship of harkinian (the pc port of Ocarina of Time). --- nix/steam_deck/configuration/flake.nix | 1 + nix/steam_deck/configuration/home.nix | 6 +++ .../configuration/hosts/deck/default.nix | 15 +++++++ .../configuration/roles/graphics/default.nix | 43 +++++++++++++++++++ .../roles/shipwright/default.nix | 34 +++++++++++++++ .../util/unfree_polyfill/default.nix | 15 +++++++ 6 files changed, 114 insertions(+) create mode 100644 nix/steam_deck/configuration/hosts/deck/default.nix create mode 100644 nix/steam_deck/configuration/roles/graphics/default.nix create mode 100644 nix/steam_deck/configuration/roles/shipwright/default.nix create mode 100644 nix/steam_deck/configuration/util/unfree_polyfill/default.nix diff --git a/nix/steam_deck/configuration/flake.nix b/nix/steam_deck/configuration/flake.nix index 6d87f5d..e68e05f 100644 --- a/nix/steam_deck/configuration/flake.nix +++ b/nix/steam_deck/configuration/flake.nix @@ -33,6 +33,7 @@ extraSpecialArgs = { inherit nixgl; }; modules = [ + ./hosts/deck ./home.nix { nixpkgs.overlays = [ nixgl.overlay ]; } ]; diff --git a/nix/steam_deck/configuration/home.nix b/nix/steam_deck/configuration/home.nix index 7232bff..dfe20e9 100644 --- a/nix/steam_deck/configuration/home.nix +++ b/nix/steam_deck/configuration/home.nix @@ -6,6 +6,12 @@ ... }: { + imports = [ + ./util/unfree_polyfill + ./roles/shipwright + ./roles/graphics + ]; + home.username = "deck"; home.homeDirectory = "/home/deck"; home.stateVersion = "24.11"; diff --git a/nix/steam_deck/configuration/hosts/deck/default.nix b/nix/steam_deck/configuration/hosts/deck/default.nix new file mode 100644 index 0000000..f6de3f2 --- /dev/null +++ b/nix/steam_deck/configuration/hosts/deck/default.nix @@ -0,0 +1,15 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ ]; + + config = { + me.graphical = true; + me.shipwright.enable = true; + }; +} diff --git a/nix/steam_deck/configuration/roles/graphics/default.nix b/nix/steam_deck/configuration/roles/graphics/default.nix new file mode 100644 index 0000000..c6f48d5 --- /dev/null +++ b/nix/steam_deck/configuration/roles/graphics/default.nix @@ -0,0 +1,43 @@ +{ + config, + lib, + pkgs, + nixgl, + ... +}: + +{ + imports = [ ]; + + options.me.graphics_card_type = lib.mkOption { + type = lib.types.nullOr ( + lib.types.enum [ + "amd" + "intel" + "nvidia" + ] + ); + default = null; + example = "amd"; + description = "What graphics card type is in the computer."; + }; + + options.me.graphical = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install graphical programs."; + }; + + config = ( + lib.mkMerge [ + (lib.mkIf config.me.graphical { + nixGL.packages = nixgl.packages; + # home.packages = with pkgs; [ + # mesa-demos # for glxgears + # vulkan-tools # for vkcube + # ]; + }) + ] + ); +} diff --git a/nix/steam_deck/configuration/roles/shipwright/default.nix b/nix/steam_deck/configuration/roles/shipwright/default.nix new file mode 100644 index 0000000..def9f7e --- /dev/null +++ b/nix/steam_deck/configuration/roles/shipwright/default.nix @@ -0,0 +1,34 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ ]; + + options.me = { + shipwright.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install shipwright."; + }; + }; + + config = lib.mkIf config.me.shipwright.enable ( + lib.mkMerge [ + { + allowedUnfree = [ "shipwright" ]; + } + (lib.mkIf config.me.graphical { + home.packages = with pkgs; [ + (config.lib.nixGL.wrap shipwright) + ]; + + # TODO perhaps install ~/.local/share/soh/shipofharkinian.json + }) + ] + ); +} diff --git a/nix/steam_deck/configuration/util/unfree_polyfill/default.nix b/nix/steam_deck/configuration/util/unfree_polyfill/default.nix new file mode 100644 index 0000000..d744cf4 --- /dev/null +++ b/nix/steam_deck/configuration/util/unfree_polyfill/default.nix @@ -0,0 +1,15 @@ +{ config, lib, ... }: + +let + inherit (builtins) elem; + inherit (lib) getName mkOption; + inherit (lib.types) listOf str; +in +{ + # Pending https://github.com/NixOS/nixpkgs/issues/55674 + options.allowedUnfree = mkOption { + type = listOf str; + default = [ ]; + }; + config.nixpkgs.config.allowUnfreePredicate = p: elem (getName p) config.allowedUnfree; +} From 7dd922c2a23c7a6b704fae08ffd9ffd80e971dd1 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 13 Feb 2025 19:26:52 -0500 Subject: [PATCH 05/19] Add a blank role. --- .../configuration/roles/blank/default.nix | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 nix/steam_deck/configuration/roles/blank/default.nix diff --git a/nix/steam_deck/configuration/roles/blank/default.nix b/nix/steam_deck/configuration/roles/blank/default.nix new file mode 100644 index 0000000..9060e79 --- /dev/null +++ b/nix/steam_deck/configuration/roles/blank/default.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ ]; + + options.me = { + blank.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install blank."; + }; + }; + + config = lib.mkIf config.me.blank.enable ( + lib.mkMerge [ + { + home.packages = with pkgs; [ + ]; + } + (lib.mkIf config.me.graphical { + }) + ] + ); +} From 48fa3c743643bf0a3d27e5e27943730b76f3f5a9 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 13 Feb 2025 19:33:07 -0500 Subject: [PATCH 06/19] Move steam rom manager to a role. --- nix/steam_deck/configuration/home.nix | 6 ++-- .../configuration/hosts/deck/default.nix | 1 + .../roles/steam_rom_manager/default.nix | 30 +++++++++++++++++++ 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 nix/steam_deck/configuration/roles/steam_rom_manager/default.nix diff --git a/nix/steam_deck/configuration/home.nix b/nix/steam_deck/configuration/home.nix index dfe20e9..433dffc 100644 --- a/nix/steam_deck/configuration/home.nix +++ b/nix/steam_deck/configuration/home.nix @@ -7,9 +7,10 @@ }: { imports = [ - ./util/unfree_polyfill - ./roles/shipwright ./roles/graphics + ./roles/shipwright + ./roles/steam_rom_manager + ./util/unfree_polyfill ]; home.username = "deck"; @@ -28,7 +29,6 @@ }; home.packages = with pkgs; [ - steam-rom-manager pkgs.nixgl.nixGLIntel (pkgs.nixgl.nixGLCommon pkgs.nixgl.nixGLIntel) pkgs.nixgl.nixVulkanIntel diff --git a/nix/steam_deck/configuration/hosts/deck/default.nix b/nix/steam_deck/configuration/hosts/deck/default.nix index f6de3f2..1b6e85a 100644 --- a/nix/steam_deck/configuration/hosts/deck/default.nix +++ b/nix/steam_deck/configuration/hosts/deck/default.nix @@ -11,5 +11,6 @@ config = { me.graphical = true; me.shipwright.enable = true; + me.steam_rom_manager.enable = false; # Steam rom manager UI does not render. I think it wants to be in an AppImage. }; } diff --git a/nix/steam_deck/configuration/roles/steam_rom_manager/default.nix b/nix/steam_deck/configuration/roles/steam_rom_manager/default.nix new file mode 100644 index 0000000..655d00e --- /dev/null +++ b/nix/steam_deck/configuration/roles/steam_rom_manager/default.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ ]; + + options.me = { + steam_rom_manager.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install steam_rom_manager."; + }; + }; + + config = lib.mkIf config.me.steam_rom_manager.enable ( + lib.mkMerge [ + (lib.mkIf config.me.graphical { + home.packages = with pkgs; [ + (config.lib.nixGL.wrap steam-rom-manager) + ]; + + }) + ] + ); +} From cac15febfa08c751ae45dc1c6a0aaab15d970a8e Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 13 Feb 2025 20:10:59 -0500 Subject: [PATCH 07/19] Add impermanence for ship of harkinian's files. --- nix/steam_deck/configuration/flake.lock | 16 ++++++++++++++++ nix/steam_deck/configuration/flake.nix | 7 ++++++- .../configuration/roles/shipwright/default.nix | 9 +++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/nix/steam_deck/configuration/flake.lock b/nix/steam_deck/configuration/flake.lock index 4320425..491c594 100644 --- a/nix/steam_deck/configuration/flake.lock +++ b/nix/steam_deck/configuration/flake.lock @@ -35,6 +35,21 @@ "type": "github" } }, + "impermanence": { + "locked": { + "lastModified": 1737831083, + "narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=", + "owner": "nix-community", + "repo": "impermanence", + "rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "impermanence", + "type": "github" + } + }, "nixgl": { "inputs": { "flake-utils": "flake-utils", @@ -75,6 +90,7 @@ "root": { "inputs": { "home-manager": "home-manager", + "impermanence": "impermanence", "nixgl": "nixgl", "nixpkgs": "nixpkgs" } diff --git a/nix/steam_deck/configuration/flake.nix b/nix/steam_deck/configuration/flake.nix index e68e05f..b1fbdbd 100644 --- a/nix/steam_deck/configuration/flake.nix +++ b/nix/steam_deck/configuration/flake.nix @@ -9,12 +9,16 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + impermanence = { + url = "github:nix-community/impermanence"; + }; }; outputs = { nixpkgs, nixgl, home-manager, + impermanence, ... }: let @@ -33,9 +37,10 @@ extraSpecialArgs = { inherit nixgl; }; modules = [ + { nixpkgs.overlays = [ nixgl.overlay ]; } + impermanence.homeManagerModules.impermanence ./hosts/deck ./home.nix - { nixpkgs.overlays = [ nixgl.overlay ]; } ]; }; }; diff --git a/nix/steam_deck/configuration/roles/shipwright/default.nix b/nix/steam_deck/configuration/roles/shipwright/default.nix index def9f7e..587dfa8 100644 --- a/nix/steam_deck/configuration/roles/shipwright/default.nix +++ b/nix/steam_deck/configuration/roles/shipwright/default.nix @@ -28,6 +28,15 @@ ]; # TODO perhaps install ~/.local/share/soh/shipofharkinian.json + + home.persistence."/home/deck/.persist" = { + directories = [ + { + directory = ".local/share/soh"; + method = "symlink"; + } + ]; + }; }) ] ); From b0186dc85bb52a553849b1881c332c49a3445854 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 13 Feb 2025 20:45:49 -0500 Subject: [PATCH 08/19] Add a role for 2ship2harkinian (Majora's Mask PC port). --- nix/steam_deck/configuration/home.nix | 1 + .../configuration/hosts/deck/default.nix | 1 + .../roles/2ship2harkinian/default.nix | 43 +++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 nix/steam_deck/configuration/roles/2ship2harkinian/default.nix diff --git a/nix/steam_deck/configuration/home.nix b/nix/steam_deck/configuration/home.nix index 433dffc..3b905dd 100644 --- a/nix/steam_deck/configuration/home.nix +++ b/nix/steam_deck/configuration/home.nix @@ -7,6 +7,7 @@ }: { imports = [ + ./roles/2ship2harkinian ./roles/graphics ./roles/shipwright ./roles/steam_rom_manager diff --git a/nix/steam_deck/configuration/hosts/deck/default.nix b/nix/steam_deck/configuration/hosts/deck/default.nix index 1b6e85a..a9cf960 100644 --- a/nix/steam_deck/configuration/hosts/deck/default.nix +++ b/nix/steam_deck/configuration/hosts/deck/default.nix @@ -10,6 +10,7 @@ config = { me.graphical = true; + me.ship2harkinian.enable = true; me.shipwright.enable = true; me.steam_rom_manager.enable = false; # Steam rom manager UI does not render. I think it wants to be in an AppImage. }; diff --git a/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix b/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix new file mode 100644 index 0000000..e26541d --- /dev/null +++ b/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix @@ -0,0 +1,43 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ ]; + + options.me = { + ship2harkinian.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install 2ship2harkinian."; + }; + }; + + config = lib.mkIf config.me.ship2harkinian.enable ( + lib.mkMerge [ + { + allowedUnfree = [ "2ship2harkinian" ]; + } + (lib.mkIf config.me.graphical { + home.packages = with pkgs; [ + (config.lib.nixGL.wrap _2ship2harkinian) + ]; + + # TODO perhaps install ~/.local/share/2ship/2ship2harkinian.json + + home.persistence."/home/deck/.persist" = { + directories = [ + { + directory = ".local/share/2ship"; + method = "symlink"; + } + ]; + }; + }) + ] + ); +} From 20e247f8ed49744aa3de3a3124902e9f7cd0ba73 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 13 Feb 2025 20:54:51 -0500 Subject: [PATCH 09/19] Add a role for sm64ex for the deck. --- nix/steam_deck/configuration/home.nix | 1 + .../configuration/hosts/deck/default.nix | 1 + .../configuration/roles/sm64ex/default.nix | 50 +++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 nix/steam_deck/configuration/roles/sm64ex/default.nix diff --git a/nix/steam_deck/configuration/home.nix b/nix/steam_deck/configuration/home.nix index 3b905dd..696a772 100644 --- a/nix/steam_deck/configuration/home.nix +++ b/nix/steam_deck/configuration/home.nix @@ -10,6 +10,7 @@ ./roles/2ship2harkinian ./roles/graphics ./roles/shipwright + ./roles/sm64ex ./roles/steam_rom_manager ./util/unfree_polyfill ]; diff --git a/nix/steam_deck/configuration/hosts/deck/default.nix b/nix/steam_deck/configuration/hosts/deck/default.nix index a9cf960..b21f52f 100644 --- a/nix/steam_deck/configuration/hosts/deck/default.nix +++ b/nix/steam_deck/configuration/hosts/deck/default.nix @@ -12,6 +12,7 @@ me.graphical = true; me.ship2harkinian.enable = true; me.shipwright.enable = true; + me.sm64ex.enable = true; me.steam_rom_manager.enable = false; # Steam rom manager UI does not render. I think it wants to be in an AppImage. }; } diff --git a/nix/steam_deck/configuration/roles/sm64ex/default.nix b/nix/steam_deck/configuration/roles/sm64ex/default.nix new file mode 100644 index 0000000..3efb338 --- /dev/null +++ b/nix/steam_deck/configuration/roles/sm64ex/default.nix @@ -0,0 +1,50 @@ +{ + 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 [ + (lib.mkIf config.me.graphical { + allowedUnfree = [ "sm64ex" ]; + + home.packages = with pkgs; [ + (config.lib.nixGL.wrap sm64ex) + ]; + + # nixpkgs.overlays = [ + # (final: prev: { + # sm4ex = prev.sm64ex.override { + # baseRom.name = "SuperMario64.z64"; + # }; + # }) + # ]; + + # TODO perhaps install ~/.local/share/sm64ex/sm64config.txt + + home.persistence."/home/deck/.persist" = { + directories = [ + { + directory = ".local/share/sm64ex"; + method = "symlink"; + } + ]; + }; + }) + ] + ); +} From 02223deb64e0189558d921d32d3375e21c70cadc Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 14 Feb 2025 19:04:50 -0500 Subject: [PATCH 10/19] Switch steam rom manager to using the AppImage. --- .../configuration/hosts/deck/default.nix | 2 +- .../roles/steam_rom_manager/default.nix | 7 ++- .../roles/steam_rom_manager/package.nix | 43 +++++++++++++++++++ 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 nix/steam_deck/configuration/roles/steam_rom_manager/package.nix diff --git a/nix/steam_deck/configuration/hosts/deck/default.nix b/nix/steam_deck/configuration/hosts/deck/default.nix index b21f52f..fb5c5e5 100644 --- a/nix/steam_deck/configuration/hosts/deck/default.nix +++ b/nix/steam_deck/configuration/hosts/deck/default.nix @@ -13,6 +13,6 @@ me.ship2harkinian.enable = true; me.shipwright.enable = true; me.sm64ex.enable = true; - me.steam_rom_manager.enable = false; # Steam rom manager UI does not render. I think it wants to be in an AppImage. + me.steam_rom_manager.enable = true; # Steam rom manager UI does not render. I think it wants to be in an AppImage. }; } diff --git a/nix/steam_deck/configuration/roles/steam_rom_manager/default.nix b/nix/steam_deck/configuration/roles/steam_rom_manager/default.nix index 655d00e..95b4bb6 100644 --- a/nix/steam_deck/configuration/roles/steam_rom_manager/default.nix +++ b/nix/steam_deck/configuration/roles/steam_rom_manager/default.nix @@ -1,10 +1,14 @@ { + stdenv, config, lib, pkgs, ... }: +let + package = (pkgs.callPackage ./package.nix { }); +in { imports = [ ]; @@ -21,9 +25,8 @@ lib.mkMerge [ (lib.mkIf config.me.graphical { home.packages = with pkgs; [ - (config.lib.nixGL.wrap steam-rom-manager) + package ]; - }) ] ); diff --git a/nix/steam_deck/configuration/roles/steam_rom_manager/package.nix b/nix/steam_deck/configuration/roles/steam_rom_manager/package.nix new file mode 100644 index 0000000..05c6f39 --- /dev/null +++ b/nix/steam_deck/configuration/roles/steam_rom_manager/package.nix @@ -0,0 +1,43 @@ +{ + stdenv, + lib, + pkgs, + makeDesktopItem, +}: + +let + version = "2.5.29"; +in +stdenv.mkDerivation { + name = "steam-rom-manager"; + src = pkgs.fetchurl { + url = "https://github.com/SteamGridDB/steam-rom-manager/releases/download/v${version}/Steam-ROM-Manager-${version}.AppImage"; + hash = "sha256-6ZJ+MGIgr2osuQuqD6N9NnPiJFNq/HW6ivG8tyXUhvs="; + }; + phases = [ + "installPhase" + ]; + installPhase = '' + runHook preInstall + mkdir -p $out/bin + install --mode=0755 $src $out/bin/steam-rom-manager + runHook postInstall + ''; + postInstall = '' + mkdir -p $out/share/applications + install -m 444 -D "$desktopItem/share/applications/"* -t $out/share/applications/ + ''; + + desktopItem = makeDesktopItem { + name = "steam-rom-manager"; + desktopName = "Steam Rom Manager"; + comment = "Manage additional entries in the Steam launcher."; + categories = [ + "Application" + "Utility" + ]; + icon = "steam-rom-manager"; + type = "Application"; + exec = "steam-rom-manager"; + }; +} From 5859a06c5d8ae98c28899d39b97c76e297c21e56 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 15 Feb 2025 10:05:59 -0500 Subject: [PATCH 11/19] Add icon to steam rom manager. --- .../roles/steam_rom_manager/package.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nix/steam_deck/configuration/roles/steam_rom_manager/package.nix b/nix/steam_deck/configuration/roles/steam_rom_manager/package.nix index 05c6f39..62e4ad9 100644 --- a/nix/steam_deck/configuration/roles/steam_rom_manager/package.nix +++ b/nix/steam_deck/configuration/roles/steam_rom_manager/package.nix @@ -7,6 +7,10 @@ let version = "2.5.29"; + icon = pkgs.fetchurl { + url = "https://github.com/SteamGridDB/steam-rom-manager/blob/master/src/assets/icons/512x512.png?raw=true"; + hash = "sha256-Nx29nJ2+44AYrTLP+CNmDJFAf2sjrH7sfYhg9fJx2qo="; + }; in stdenv.mkDerivation { name = "steam-rom-manager"; @@ -23,9 +27,11 @@ stdenv.mkDerivation { install --mode=0755 $src $out/bin/steam-rom-manager runHook postInstall ''; + # We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them. postInstall = '' - mkdir -p $out/share/applications - install -m 444 -D "$desktopItem/share/applications/"* -t $out/share/applications/ + mkdir -p $out/share/{applications,pixmaps} + install -m 555 -D "$desktopItem/share/applications/"* -t $out/share/applications/ + install -m 444 -D "${icon}" $out/share/pixmaps/steamrommanager.png ''; desktopItem = makeDesktopItem { @@ -36,7 +42,7 @@ stdenv.mkDerivation { "Application" "Utility" ]; - icon = "steam-rom-manager"; + icon = "steamrommanager"; type = "Application"; exec = "steam-rom-manager"; }; From a4abb96de3798f94edafca70596783e5965d85d5 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 15 Feb 2025 10:57:18 -0500 Subject: [PATCH 12/19] Switch to deploying the sm64ex config file. --- nix/steam_deck/configuration/roles/sm64ex/default.nix | 11 +++++------ .../configuration/roles/sm64ex/files/sm64config.txt | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 nix/steam_deck/configuration/roles/sm64ex/files/sm64config.txt diff --git a/nix/steam_deck/configuration/roles/sm64ex/default.nix b/nix/steam_deck/configuration/roles/sm64ex/default.nix index 3efb338..c1035d8 100644 --- a/nix/steam_deck/configuration/roles/sm64ex/default.nix +++ b/nix/steam_deck/configuration/roles/sm64ex/default.nix @@ -34,14 +34,13 @@ # }) # ]; - # TODO perhaps install ~/.local/share/sm64ex/sm64config.txt + home.file.".local/share/sm64ex/sm64config.txt" = { + source = ./files/sm64config.txt; + }; home.persistence."/home/deck/.persist" = { - directories = [ - { - directory = ".local/share/sm64ex"; - method = "symlink"; - } + files = [ + ".local/share/sm64ex/sm64_save_file.bin" ]; }; }) diff --git a/nix/steam_deck/configuration/roles/sm64ex/files/sm64config.txt b/nix/steam_deck/configuration/roles/sm64ex/files/sm64config.txt new file mode 100644 index 0000000..2edf4b9 --- /dev/null +++ b/nix/steam_deck/configuration/roles/sm64ex/files/sm64config.txt @@ -0,0 +1 @@ +fullscreen true From 7dcdcc906cc4d95f1bd7e7d371214aadd86ab55c Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 15 Feb 2025 11:40:09 -0500 Subject: [PATCH 13/19] Switch to deploying the ship of harkinian config file. --- .../roles/shipwright/default.nix | 12 ++++++++++-- .../shipwright/files/shipofharkinian.json | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 nix/steam_deck/configuration/roles/shipwright/files/shipofharkinian.json diff --git a/nix/steam_deck/configuration/roles/shipwright/default.nix b/nix/steam_deck/configuration/roles/shipwright/default.nix index 587dfa8..ce1af5d 100644 --- a/nix/steam_deck/configuration/roles/shipwright/default.nix +++ b/nix/steam_deck/configuration/roles/shipwright/default.nix @@ -1,3 +1,4 @@ +# MANUAL: mkdir -p ~/.persist/.local/share/soh/Save { config, lib, @@ -27,16 +28,23 @@ (config.lib.nixGL.wrap shipwright) ]; - # TODO perhaps install ~/.local/share/soh/shipofharkinian.json + home.file.".local/share/soh/shipofharkinian.json" = { + source = ./files/shipofharkinian.json; + }; home.persistence."/home/deck/.persist" = { directories = [ { - directory = ".local/share/soh"; + directory = ".local/share/soh/Save"; method = "symlink"; } ]; }; + home.persistence."/home/deck/.state" = { + files = [ + ".local/share/soh/oot.otr" + ]; + }; }) ] ); diff --git a/nix/steam_deck/configuration/roles/shipwright/files/shipofharkinian.json b/nix/steam_deck/configuration/roles/shipwright/files/shipofharkinian.json new file mode 100644 index 0000000..0f440ef --- /dev/null +++ b/nix/steam_deck/configuration/roles/shipwright/files/shipofharkinian.json @@ -0,0 +1,19 @@ +{ + "CVars": { + "gInternalResolution": 2.0, + "gInterpolationFPS": 60, + "gMSAAValue": 2, + "gMatchRefreshRate": 0, + "gOnFileSelectNameEntry": 0, + "gOpenWindows": { + "modalWindowEnabled": 1 + }, + "gZFightingMode": 0 + }, + "ConfigVersion": 2, + "Window": { + "Fullscreen": { + "Enabled": true + } + } +} From 5d4ebf90b3f8846e136994b9bd4b8fd9ab45be57 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 15 Feb 2025 11:51:50 -0500 Subject: [PATCH 14/19] Fix launching ship of harkinian from KDE plasma's start menu. --- .../roles/shipwright/default.nix | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/nix/steam_deck/configuration/roles/shipwright/default.nix b/nix/steam_deck/configuration/roles/shipwright/default.nix index ce1af5d..3557290 100644 --- a/nix/steam_deck/configuration/roles/shipwright/default.nix +++ b/nix/steam_deck/configuration/roles/shipwright/default.nix @@ -25,7 +25,7 @@ } (lib.mkIf config.me.graphical { home.packages = with pkgs; [ - (config.lib.nixGL.wrap shipwright) + shipwright ]; home.file.".local/share/soh/shipofharkinian.json" = { @@ -45,6 +45,26 @@ ".local/share/soh/oot.otr" ]; }; + + nixpkgs.overlays = [ + (final: prev: { + shipwright = pkgs.buildEnv { + name = prev.shipwright.name; + paths = [ + (config.lib.nixGL.wrap prev.shipwright) + ]; + extraOutputsToInstall = [ + "man" + "doc" + "info" + ]; + # We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them. + postBuild = '' + chmod 0555 $out/share/applications/soh.desktop + ''; + }; + }) + ]; }) ] ); From 381e3fb5916fb4995314505ef521fbc18493ca03 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 15 Feb 2025 12:15:58 -0500 Subject: [PATCH 15/19] Switch to deploying 2ship2harkinian config file and fix launching it from KDE plasma's start menu. --- .../roles/2ship2harkinian/default.nix | 34 +++++++++++++++++-- .../files/2ship2harkinian.json | 15 ++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 nix/steam_deck/configuration/roles/2ship2harkinian/files/2ship2harkinian.json diff --git a/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix b/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix index e26541d..2c6b2e5 100644 --- a/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix +++ b/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix @@ -1,3 +1,4 @@ +# MANUAL: mkdir -p ~/.persist/.local/share/2ship/saves { config, lib, @@ -24,19 +25,46 @@ } (lib.mkIf config.me.graphical { home.packages = with pkgs; [ - (config.lib.nixGL.wrap _2ship2harkinian) + _2ship2harkinian ]; - # TODO perhaps install ~/.local/share/2ship/2ship2harkinian.json + home.file.".local/share/2ship/2ship2harkinian.json" = { + source = ./files/2ship2harkinian.json; + }; home.persistence."/home/deck/.persist" = { directories = [ { - directory = ".local/share/2ship"; + directory = ".local/share/2ship/saves"; method = "symlink"; } ]; }; + home.persistence."/home/deck/.state" = { + files = [ + ".local/share/2ship/mm.o2r" + ]; + }; + + nixpkgs.overlays = [ + (final: prev: { + _2ship2harkinian = pkgs.buildEnv { + name = prev._2ship2harkinian.name; + paths = [ + (config.lib.nixGL.wrap prev._2ship2harkinian) + ]; + extraOutputsToInstall = [ + "man" + "doc" + "info" + ]; + # We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them. + postBuild = '' + chmod 0555 $out/share/applications/2s2h.desktop + ''; + }; + }) + ]; }) ] ); diff --git a/nix/steam_deck/configuration/roles/2ship2harkinian/files/2ship2harkinian.json b/nix/steam_deck/configuration/roles/2ship2harkinian/files/2ship2harkinian.json new file mode 100644 index 0000000..87a4f88 --- /dev/null +++ b/nix/steam_deck/configuration/roles/2ship2harkinian/files/2ship2harkinian.json @@ -0,0 +1,15 @@ +{ + "CVars": { + "gInterpolationFPS": 60, + "gSettings": { + "InternalResolution": 2.0, + "MSAAValue": 2, + "OpenMenuBar": 0 + } + }, + "Window": { + "Fullscreen": { + "Enabled": true + } + } +} From 46b21370bd543966302c407e1201c2bd09d43650 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 15 Feb 2025 12:18:59 -0500 Subject: [PATCH 16/19] Auto-clean-up steam deck nix store. --- nix/steam_deck/configuration/home.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nix/steam_deck/configuration/home.nix b/nix/steam_deck/configuration/home.nix index 696a772..cbb12f9 100644 --- a/nix/steam_deck/configuration/home.nix +++ b/nix/steam_deck/configuration/home.nix @@ -29,6 +29,14 @@ "flakes" ]; }; + # Automatic garbage collection + nix.gc = { + # Runs nix-collect-garbage --delete-older-than 30d + automatic = true; + randomizedDelaySec = "14m"; + options = "--delete-older-than 30d"; + }; + nix.settings.auto-optimise-store = true; home.packages = with pkgs; [ pkgs.nixgl.nixGLIntel From 54860370c08cec3dec7dc707d7574847556d2a06 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 15 Feb 2025 19:31:16 -0500 Subject: [PATCH 17/19] Add a desktop file for sm64ex. --- .../configuration/roles/sm64ex/default.nix | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/nix/steam_deck/configuration/roles/sm64ex/default.nix b/nix/steam_deck/configuration/roles/sm64ex/default.nix index c1035d8..c648bbe 100644 --- a/nix/steam_deck/configuration/roles/sm64ex/default.nix +++ b/nix/steam_deck/configuration/roles/sm64ex/default.nix @@ -23,7 +23,7 @@ allowedUnfree = [ "sm64ex" ]; home.packages = with pkgs; [ - (config.lib.nixGL.wrap sm64ex) + sm64ex ]; # nixpkgs.overlays = [ @@ -43,6 +43,41 @@ ".local/share/sm64ex/sm64_save_file.bin" ]; }; + + nixpkgs.overlays = [ + (final: prev: { + sm64ex = + let + desktop_item = pkgs.makeDesktopItem { + name = "sm64ex"; + desktopName = "Super Mario 64"; + comment = "A PC Port of Super Mario 64."; + categories = [ + "Game" + ]; + icon = "sm64ex"; + type = "Application"; + exec = "sm64ex"; + }; + in + pkgs.buildEnv { + name = prev.sm64ex.name; + paths = [ + (config.lib.nixGL.wrap prev.sm64ex) + ]; + extraOutputsToInstall = [ + "man" + "doc" + "info" + ]; + # We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them. + postBuild = '' + install -m 555 -D "${desktop_item}/share/applications/"* -t $out/share/applications/ + install -m 444 -D "${./files/icon.png}" $out/share/pixmaps/sm64ex.png + ''; + }; + }) + ]; }) ] ); From e7528765a96e3497efd495824492b9a2f06ae181 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 15 Feb 2025 20:22:29 -0500 Subject: [PATCH 18/19] Add a wrapper script to launch ship of harkinian in gaming mode. --- nix/steam_deck/configuration/roles/shipwright/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nix/steam_deck/configuration/roles/shipwright/default.nix b/nix/steam_deck/configuration/roles/shipwright/default.nix index 3557290..49ad9ee 100644 --- a/nix/steam_deck/configuration/roles/shipwright/default.nix +++ b/nix/steam_deck/configuration/roles/shipwright/default.nix @@ -6,6 +6,12 @@ ... }: +let + steam_shipwright = pkgs.writeScriptBin "steam_soh" '' + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.libglvnd}/lib" + exec ${pkgs.shipwright}/bin/soh + ''; +in { imports = [ ]; @@ -26,6 +32,7 @@ (lib.mkIf config.me.graphical { home.packages = with pkgs; [ shipwright + steam_shipwright ]; home.file.".local/share/soh/shipofharkinian.json" = { From 345c62a477662851f9dc4e4fb8493eaed41bbe8e Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 15 Feb 2025 20:50:34 -0500 Subject: [PATCH 19/19] Add wrappers for 2ship2harkinian and sm64ex also. Set the steam launcher to run /home/deck/.nix-profile/bin/steam_ to have it work inside steam gaming mode. --- .../configuration/roles/2ship2harkinian/default.nix | 7 +++++++ nix/steam_deck/configuration/roles/sm64ex/default.nix | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix b/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix index 2c6b2e5..2447746 100644 --- a/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix +++ b/nix/steam_deck/configuration/roles/2ship2harkinian/default.nix @@ -6,6 +6,12 @@ ... }: +let + steam_2s2h = pkgs.writeScriptBin "steam_2s2h" '' + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.libglvnd}/lib" + exec ${pkgs._2ship2harkinian}/bin/2s2h + ''; +in { imports = [ ]; @@ -26,6 +32,7 @@ (lib.mkIf config.me.graphical { home.packages = with pkgs; [ _2ship2harkinian + steam_2s2h ]; home.file.".local/share/2ship/2ship2harkinian.json" = { diff --git a/nix/steam_deck/configuration/roles/sm64ex/default.nix b/nix/steam_deck/configuration/roles/sm64ex/default.nix index c648bbe..a081885 100644 --- a/nix/steam_deck/configuration/roles/sm64ex/default.nix +++ b/nix/steam_deck/configuration/roles/sm64ex/default.nix @@ -5,6 +5,12 @@ ... }: +let + steam_sm64ex = pkgs.writeScriptBin "steam_sm64ex" '' + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.libglvnd}/lib" + exec ${pkgs.sm64ex}/bin/sm64ex + ''; +in { imports = [ ]; @@ -24,6 +30,7 @@ home.packages = with pkgs; [ sm64ex + steam_sm64ex ]; # nixpkgs.overlays = [