From 3516b5fb91a42a2d54a71b46d2a61b75e3de2895 Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Thu, 20 Mar 2025 15:33:34 +0100 Subject: [PATCH 1/2] workmac: add autossh-based socks proxy job to Hydra native launchd user job --- home/workmac.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/home/workmac.nix b/home/workmac.nix index 0aff0cb..f2b7969 100644 --- a/home/workmac.nix +++ b/home/workmac.nix @@ -94,6 +94,25 @@ in + import ./scripts/ssh-loop-fc.nix { inherit pkgs lib; } ); + launchd.agents.hydra_proxy = { + enable = true; + config = { + ProgramArguments = [ + "${lib.getExe pkgs.autossh}" + "-M" + "0" + "-D" + "1080" + "-oServerAliveInterval=60" + "-oControlMaster=no" + "-N" + "vpn-whq.services.fcio.net" + ]; + # TODO: consider socket activation instead + KeepAlive = true; + ThrottleInterval = 60; + }; + }; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "1password-cli" ]; home.stateVersion = "22.05"; From 6f936dc3f881d54ebf7b9da3b5fbf3be5d9ecf25 Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Thu, 20 Mar 2025 15:38:02 +0100 Subject: [PATCH 2/2] home.git: provide `git mergetool -t nixfmt` --- home/common.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home/common.nix b/home/common.nix index 6f9c9c7..f65ceff 100644 --- a/home/common.nix +++ b/home/common.nix @@ -3,6 +3,7 @@ inputs, config, system, + lib, ... }: { @@ -48,6 +49,11 @@ init.defaultBranch = "mainline"; diff.tool = "vimdiff"; merge.tool = "vimdiff"; + # provide `git mergetool -t nixfmt` + mergetool.nixfmt = { + cmd = "${lib.getExe pkgs.nixfmt-rfc-style} --mergetool \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\""; + trustExitCode = true; + }; core.excludesfile = toString ( pkgs.writeText ".gitignore_global" '' # Direnv stuff #