My nix-darwin and NixOS config
3
fork

Configure Feed

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

fix: restrict Tangled remote to desktop hosts only

+11 -7
+11 -7
home/default.nix
··· 103 103 104 104 # ── nix-config git repo ──────────────────────────────────────────────────── 105 105 # Ensures ~/.config/nix-config is always a git repo with the correct remotes. 106 + # Server hosts only use origin (GitHub) — Tangled is for desktop hosts only. 106 107 home.activation.nixConfigGitRepo = lib.hm.dag.entryAfter [ "writeBoundary" ] '' 107 108 nix_config="${config.home.homeDirectory}/.config/nix-config" 108 109 github_remote="git@github.com:ewanc26/nix" ··· 128 129 echo "nix-config: updated origin -> $github_remote" 129 130 fi 130 131 131 - current_tangled=$(${pkgs.git}/bin/git remote get-url tangled 2>/dev/null || echo "") 132 - if [ -z "$current_tangled" ]; then 133 - $DRY_RUN_CMD ${pkgs.git}/bin/git remote add tangled "$tangled_remote" 134 - echo "nix-config: added tangled -> $tangled_remote" 135 - elif [ "$current_tangled" != "$tangled_remote" ]; then 136 - $DRY_RUN_CMD ${pkgs.git}/bin/git remote set-url tangled "$tangled_remote" 137 - echo "nix-config: updated tangled -> $tangled_remote" 132 + # Tangled remote — desktop hosts only 133 + if ${lib.boolToString cfg.isDesktop}; then 134 + current_tangled=$(${pkgs.git}/bin/git remote get-url tangled 2>/dev/null || echo "") 135 + if [ -z "$current_tangled" ]; then 136 + $DRY_RUN_CMD ${pkgs.git}/bin/git remote add tangled "$tangled_remote" 137 + echo "nix-config: added tangled -> $tangled_remote" 138 + elif [ "$current_tangled" != "$tangled_remote" ]; then 139 + $DRY_RUN_CMD ${pkgs.git}/bin/git remote set-url tangled "$tangled_remote" 140 + echo "nix-config: updated tangled -> $tangled_remote" 141 + fi 138 142 fi 139 143 fi 140 144 '';