Skip to content

Commit a118b92

Browse files
committed
nix: source cc-proxy, chrome-cdp and portless from their own flakes
Each of the three repos now exposes a buildGoModule package, so the CLIs come from nix instead of the sanketsudake/tap Homebrew casks. They land in home.packages and the cask entries go away in the same generation, which matters because cleanup = "uninstall" would otherwise leave both copies on PATH for a switch. The inputs track each repo's default branch rather than its release tags, because the existing tags predate the flakes. Note that a repo's vendorHash has to be refreshed whenever its go.sum moves, so a dependency bump there can break the build here until that lands. cines stays a cask: it is a Qt .app shipped as a universal DMG, and nix on darwin would put it in ~/Applications/Home Manager Apps, which Spotlight indexes poorly. The tap stays for it.
1 parent ebbe78d commit a118b92

4 files changed

Lines changed: 106 additions & 7 deletions

File tree

flake.lock

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@
1111
url = "github:nix-community/home-manager";
1212
inputs.nixpkgs.follows = "nixpkgs";
1313
};
14+
15+
# Own CLIs, packaged as flakes in their own repos (they used to come from
16+
# the sanketsudake/tap Homebrew casks). Each follows this flake's nixpkgs
17+
# so there is exactly one nixpkgs in the closure.
18+
cc-proxy = {
19+
url = "github:sanketsudake/cc-proxy";
20+
inputs.nixpkgs.follows = "nixpkgs";
21+
};
22+
chrome-cdp-cli = {
23+
url = "github:sanketsudake/chrome-cdp-cli";
24+
inputs.nixpkgs.follows = "nixpkgs";
25+
};
26+
go-portless = {
27+
url = "github:sanketsudake/go-portless";
28+
inputs.nixpkgs.follows = "nixpkgs";
29+
};
1430
};
1531

1632
outputs =
@@ -29,6 +45,7 @@
2945
home-manager = {
3046
useGlobalPkgs = true;
3147
useUserPackages = true;
48+
extraSpecialArgs = { inherit inputs; };
3249
backupFileExtension = "hm-backup";
3350
users.sanketsudake = import ./nix/home;
3451
};

nix/darwin/homebrew.nix

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,15 @@
4444
"slack"
4545
"visual-studio-code"
4646
"zoom"
47-
{ name = "sanketsudake/tap/cc-proxy"; trusted = true; }
48-
{ name = "sanketsudake/tap/chrome-cdp"; trusted = true; }
49-
{ name = "sanketsudake/tap/portless"; trusted = true; }
50-
{ name = "sanketsudake/tap/cines"; trusted = true; }
47+
# cc-proxy, chrome-cdp and portless moved to nix — each repo exposes a
48+
# flake, wired as an input in flake.nix and installed from
49+
# nix/home/packages.nix. cines stays a cask: it is a Qt .app from a
50+
# universal DMG, and nix on darwin would land it in
51+
# ~/Applications/Home Manager Apps, which Spotlight indexes poorly.
52+
{
53+
name = "sanketsudake/tap/cines";
54+
trusted = true;
55+
}
5156
];
5257

5358
# App Store apps (need App Store sign-in on a new Mac).

nix/home/packages.nix

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
# CLI packages from nixpkgs (was homebrew brews), migrated in batches —
22
# see the Nix migration plan. Grouped to mirror the old Brewfile sections.
3-
{ pkgs, ... }:
3+
{ pkgs, inputs, ... }:
4+
let
5+
system = pkgs.stdenv.hostPlatform.system;
6+
in
47
{
5-
home.packages = with pkgs; [
8+
# Own CLIs, built from the flake each repo now exposes. They used to be
9+
# sanketsudake/tap Homebrew casks (goreleaser-published binaries); nix builds
10+
# them from the pinned source instead. The inputs track each repo's default
11+
# branch, not its release tags, so `nix flake update <input>` moves to main
12+
# HEAD — which may sit ahead of the last tag. Pinning an input to a tag
13+
# becomes possible once a release carries flake.nix.
14+
home.packages = [
15+
inputs.cc-proxy.packages.${system}.default
16+
inputs.chrome-cdp-cli.packages.${system}.default
17+
inputs.go-portless.packages.${system}.default
18+
]
19+
++ (with pkgs; [
620
# --- core CLI (batch 1) ---
721
# GNU tools install unprefixed here (brew kept them g-prefixed/off-PATH
822
# except grep/make), so sed/find/ls flip to GNU-by-default — deliberate,
@@ -109,5 +123,5 @@
109123
go-licenses
110124
protoc-gen-go
111125
protoc-gen-go-grpc
112-
];
126+
]);
113127
}

0 commit comments

Comments
 (0)