Rules-based browser launcher for TUI + GNOME. switchyard.aly.codes
tui gome bowser go
0

Configure Feed

Select the types of activity you want to include in your feed.

nix: add sw package and reorganize nix directory

Aly Raffauf (Jul 5, 2026, 9:55 PM EDT) eb02fdfe 61124f7d

+38 -4
+9 -2
flake/packages.nix
··· 5 5 pkgs, 6 6 self', 7 7 ... 8 - }: { 8 + }: let 9 + # Shared across both Go packages 10 + vendorHash = "sha256-Mkb8LSMUeKqOHxvHq7W1/7rxRr73Cx3L1Pf7+xjWgaE="; 11 + in { 9 12 packages = { 10 13 default = self'.packages.switchyard; 11 14 ··· 17 20 build-system = with pkgs.python3.pkgs; [setuptools]; 18 21 }; 19 22 20 - switchyard = pkgs.callPackage ../package.nix {}; 23 + # GTK GUI (cmd/switchyard). 24 + switchyard = pkgs.callPackage ../nix/switchyard.nix {inherit vendorHash;}; 25 + 26 + # Terminal browser picker (cmd/sw). 27 + sw = pkgs.callPackage ../nix/sw.nix {inherit vendorHash;}; 21 28 }; 22 29 }; 23 30 }
+26
nix/sw.nix
··· 1 + { 2 + buildGoModule, 3 + lib, 4 + vendorHash, 5 + }: 6 + buildGoModule { 7 + pname = "switchyard-sw"; 8 + version = "dev"; 9 + src = ../.; 10 + inherit vendorHash; 11 + subPackages = ["cmd/sw"]; 12 + env.CGO_ENABLED = "0"; 13 + 14 + ldflags = [ 15 + "-s" 16 + "-w" 17 + ]; 18 + 19 + meta = with lib; { 20 + description = "Switchyard's terminal browser picker"; 21 + homepage = "https://github.com/alyraffauf/switchyard"; 22 + license = licenses.gpl3Plus; 23 + platforms = platforms.linux; 24 + mainProgram = "sw"; 25 + }; 26 + }
+3 -2
package.nix nix/switchyard.nix
··· 6 6 libadwaita, 7 7 lib, 8 8 pkg-config, 9 + vendorHash, 9 10 wrapGAppsHook4, 10 11 }: 11 12 buildGoModule { 12 13 pname = "switchyard"; 13 14 version = "dev"; 14 - src = ./.; 15 - vendorHash = "sha256-Mkb8LSMUeKqOHxvHq7W1/7rxRr73Cx3L1Pf7+xjWgaE="; 15 + src = ../.; 16 + inherit vendorHash; 16 17 subPackages = ["cmd/switchyard"]; 17 18 18 19 ldflags = [