diff --git a/machines/prattle/default.nix b/machines/prattle/default.nix index e9427e5..6b55baf 100644 --- a/machines/prattle/default.nix +++ b/machines/prattle/default.nix @@ -533,7 +533,10 @@ RemainAfterExit = true; EnvironmentFile = config.services.garage.environmentFile or null; }; - path = [ config.services.garage.package pkgs.coreutils ]; + path = [ + config.services.garage.package + pkgs.coreutils + ]; script = '' set -euo pipefail GARAGE="${config.services.garage.package}/bin/garage" diff --git a/modules/home/apps/jj.nix b/modules/home/apps/jj.nix index 54a0ee4..506918b 100644 --- a/modules/home/apps/jj.nix +++ b/modules/home/apps/jj.nix @@ -25,7 +25,10 @@ }; "--scope" = [ { - "--when".commands = [ "diff" "show" ]; + "--when".commands = [ + "diff" + "show" + ]; ui = { pager = "delta"; diff-formatter = ":git"; diff --git a/modules/home/apps/ssh.nix b/modules/home/apps/ssh.nix index c8b20b6..90e9904 100644 --- a/modules/home/apps/ssh.nix +++ b/modules/home/apps/ssh.nix @@ -75,7 +75,14 @@ in }; setEnv = mkOption { - type = types.attrsOf (types.oneOf [types.str types.path types.int types.float]); + type = types.attrsOf ( + types.oneOf [ + types.str + types.path + types.int + types.float + ] + ); default = { }; description = "Environment variables to set (maps to SetEnv)"; }; @@ -87,13 +94,28 @@ in }; requestTTY = mkOption { - type = types.nullOr (types.enum ["yes" "no" "force" "auto"]); + type = types.nullOr ( + types.enum [ + "yes" + "no" + "force" + "auto" + ] + ); default = null; description = "Request a pseudo-terminal (maps to RequestTTY)"; }; controlMaster = mkOption { - type = types.nullOr (types.enum ["yes" "no" "ask" "auto" "autoask"]); + type = types.nullOr ( + types.enum [ + "yes" + "no" + "ask" + "auto" + "autoask" + ] + ); default = null; description = "Control master setting"; }; @@ -141,7 +163,8 @@ in let # Build settings entries from atelier.ssh.hosts hostSettings = filterAttrs (_: v: v != { }) ( - mapAttrs (name: hostCfg: + mapAttrs ( + name: hostCfg: let base = filterAttrs (_: v: v != null) { HostName = hostCfg.hostname; @@ -174,7 +197,8 @@ in zmxSettings = if cfg.zmx.enable then listToAttrs ( - map (pattern: + map ( + pattern: let patternHost = cfg.hosts.${pattern} or { }; in diff --git a/modules/home/system/shell.nix b/modules/home/system/shell.nix index 9425623..7d02df9 100644 --- a/modules/home/system/shell.nix +++ b/modules/home/system/shell.nix @@ -677,6 +677,11 @@ let if [[ "$GITHUB" == true ]] && [[ "$SKIP_REMOTE_CREATION" == false ]]; then gh_args=("$GITHUB_USER/$NAME" "--$VISIBILITY") [[ -n "$DESCRIPTION" ]] && gh_args+=("--description" "$DESCRIPTION") + # When tangled is also enabled, gh's remote must be named "github" + # so it doesn't claim "origin" (which belongs to the knot). + if [[ "$TANGLED" == true ]]; then + gh_args+=("--remote" "github") + fi if ${pkgs.gh}/bin/gh repo create "''${gh_args[@]}" 2>/tmp/gh-error-$$.log; then ${pkgs.gum}/bin/gum style --foreground 35 "✓ GitHub: https://github.com/$GITHUB_USER/$NAME" @@ -1314,7 +1319,9 @@ in add-zsh-hook chpwd auto_nix # zsh-patina: Rust-based syntax highlighting (must be last) - eval "$(${inputs.zsh-patina.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/zsh-patina activate)" + eval "$(${ + inputs.zsh-patina.packages.${pkgs.stdenv.hostPlatform.system}.default + }/bin/zsh-patina activate)" ''; history = { @@ -1422,7 +1429,8 @@ in home.sessionPath = [ "$HOME/go/bin" "$HOME/.local/bin" - ] ++ lib.optionals pkgs.stdenv.isDarwin [ + ] + ++ lib.optionals pkgs.stdenv.isDarwin [ "/opt/homebrew/bin" "/opt/homebrew/sbin" "/opt/local/bin" @@ -1433,7 +1441,8 @@ in home.sessionVariables = { GITSTATUS_DIR = "${pkgs.gitstatus}/share/gitstatus"; CRUSH_ALGORITHMIC_COMPACT = "1"; - } // lib.optionalAttrs pkgs.stdenv.isDarwin { + } + // lib.optionalAttrs pkgs.stdenv.isDarwin { HOMEBREW_PREFIX = "/opt/homebrew"; HOMEBREW_CELLAR = "/opt/homebrew/Cellar"; HOMEBREW_REPOSITORY = "/opt/homebrew"; diff --git a/modules/home/wm/yabai/default.nix b/modules/home/wm/yabai/default.nix index 221d918..96d5fd0 100644 --- a/modules/home/wm/yabai/default.nix +++ b/modules/home/wm/yabai/default.nix @@ -32,7 +32,13 @@ let # Ensure required binaries resolve even when this script is re-run by the # home-manager onChange hook, which uses a minimal PATH. - export PATH="${lib.makeBinPath [ cfg.package pkgs.jq pkgs.coreutils ]}:/usr/bin:/bin:$PATH" + export PATH="${ + lib.makeBinPath [ + cfg.package + pkgs.jq + pkgs.coreutils + ] + }:/usr/bin:/bin:$PATH" # Re-load scripting addition after dock restarts yabai -m signal --add event=dock_did_restart action="sudo ${yabaiExe} --load-sa"