No description
  • Nix 50.2%
  • Shell 46.7%
  • Lua 3.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Viktor Hedefalk 2b5fbc09a5
fix(pass): make pass git use Apple ssh to avoid colima GSSAPI warning
The nixpkgs pass wrapper prepends openssh built without GSSAPI, which
warns on the GSSAPIAuthentication line in ~/.colima/ssh_config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:11:39 +02:00
docs feat(chromium): add Helium browser, mirror Widevine into its profile too 2026-10-22 15:14:18 +02:00
dots eir-prod-logout: log out of the eir prod SSO session only (sandbox stays logged in) 2026-10-08 11:35:57 +02:00
home fix(pass): make pass git use Apple ssh to avoid colima GSSAPI warning 2026-10-24 18:11:39 +02:00
hosts feat(studio): SSH and Screen Sharing over the tailnet 2026-09-30 09:55:43 +02:00
lib Silence darwin-rebuild evaluation warnings 2026-05-12 10:50:52 +02:00
profiles feat(chromium): add Helium browser, mirror Widevine into its profile too 2026-10-22 15:14:18 +02:00
stow uptodate on m4 air 2025-09-05 23:04:27 +02:00
.gitignore feat: add herdr flake input (v0.7.5), mole brew, tectonic; drop pi models.json 2026-08-19 10:35:04 +02:00
flake.lock fix(kanata): wait for Nix store at boot, drop Tarmak layers, add qwerty 2026-09-09 09:18:16 +02:00
flake.nix feat: add herdr flake input (v0.7.5), mole brew, tectonic; drop pi models.json 2026-08-19 10:35:04 +02:00
machines.nix Move heavy casks off Pro14 and drop Air15 host 2026-05-21 13:32:26 +02:00
README.md New Mac 14" 2026-01-19 09:53:13 +01:00

New Mac?

Prerequisites

Install nix and homebrew. Homebrew is managed by nix-darwin, but it still needs to be installed. Also need Rosetta for just a couple of things (adobe-digital-editions for library books). Not gonna chase it since I need Rosetta for container stuff anyways.

sh <(curl -L https://nixos.org/nix/install)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
sudo softwareupdate --install-rosetta

Use this repo

  1. Clone the repo

     git clone https://github.com/hedefalk/dotfiles.git
     cd dotfiles
    
  2. Add a machine config in the main flake.nix and match it with the LocalHostName or any other means. I'm using LocalHostName like this:

     sudo scutil --set HostName "MyNewMac"
    
     nix --extra-experimental-features "nix-command flakes" run nix-darwin/nix-darwin-25.05#darwin-rebuild -- switch --flake path:$HOME/dotfiles/#$(scutil --get LocalHostName)
    

LocalHostName is a main entry in flake.nix.

  1. Still need to

     chsh -s /run/current-system/sw/bin/fish
    

With that run I have access to all my cli tools as well as almost all ui apps via homebrew casks.

  1. Create a gpg key

    gpg --full-generate-key

    Do not fill out "comment" because git wont match then, it matches verbatim:

       [user]
          	name = Viktor Hedefalk
           email = hedefalk@gmail.com
    

    Probably can fix that if I want specific named/commented gpg keys, but I'm ok with the same name.

  2. Push this public key up to github as a signing key

     gh auth login // no ssh keys
     gh auth refresh -h github.com -s admin:gpg_key
    
     set KEY_ID (gpg --list-secret-keys --keyid-format=long | grep sec | head -n 1 | string replace -r '.*\/([A-F0-9]+) .*' '$1'); and \
           gpg --armor --export $KEY_ID > /tmp/github_gpg_key.asc; and \
           gh api --method POST \
             -H "Accept: application/vnd.github+json" \
             /user/gpg_keys \
             -F "armored_public_key=@/tmp/github_gpg_key.asc"; and \
           rm /tmp/github_gpg_key.asc
    
     git remote set-url origin git@github.com:hedefalk/dotfiles.git
     git push
    
     // Still not working ? ^
    

TODO: ^: ssh-add -L should work?

For github I just: ssh-add -L | glab ssh-key add --title "GPG-derived SSH Key"

  1. Also need to add an auth subkey and then push that up to github as an SSH key for authentication:

    gpg --expert --edit-key YOUR_KEY_ID

Choose (8), remove signing and encryption and just enable authentication, quit, choose 4096 bits and save.

Upload to github:

gpg --export-ssh-key $(gpg --list-secret-keys --with-colons | awk -F: '/^ssb.*a/ {print $5}' | head -1) | gh ssh-key add - --title "M4 Air GPG SSH Key"

Will need to authorize the cli to do this with the browser so could of course opt to not to it directly with browser.

Push SSH key to remote server via local network

On new Mac: printf "Serving at: %s:9999\n" "$(ipconfig getifaddr en0)" && ssh-add -L | nc -l 9999

On Mac with existing server access: nc 9999 | ssh user@server "cat >> ~/.ssh/authorized_keys"

TODO:

Vaultwarden

bitwarden-cli intstalled via brew temporarily since nix derivation broken.

bw config server https://vaultwarden.woodenstake.se

Is this ^ a dotfile to be added here?