Skip to content
This repository has been archived by the owner on Aug 24, 2024. It is now read-only.

y3owk1n/nix-system-config

Repository files navigation

My Personal Nix System Configuration

This is a project to help me to manage my Nix system configuration, mainly with Darwin and Home Manager.

What do I use?

General

Notes for future me

To use MX Master 3 bluetooth mouse with kanata

Note

Not using kanata anymore, got my zsa voyager keyboard.

  • Reset kanata
  • Restart Keychron keyboard
  • Both keyboard and mouse should be working

Commands to make it work (For future me)

Installing Nix on Macos

https://nixos.org/download#nix-install-macos

sh <(curl -L https://nixos.org/nix/install)

Configure github helper

Note

Not using this anymore, this can configured directly with github cli

git credential-oauth configure

Getting localhostname

scutil --get LocalHostName

Getting username

whoami

Switch to fish shell

chsh -s (which fish)

Build nix to results

sudo nix --extra-experimental-features 'nix-command flakes' build .#darwinConfigurations.your-local-hostname.system

Initialise darwin rebuild

./result/sw/bin/darwin-rebuild switch --flake ~/nix-system-config

Cleanup

bash ~/nix-system-config/cleanup.sh

Installing NPM packages that are not available in Nix

Navigate to ...../modules/home-manager/node-packages and run the following command to generate a nix expression. The expression can then be added into home manager

  • -18 is to build with nodejs v18
nix-shell -p nodePackages.node2nix --command "node2nix -18 -i ./node-packages.json -o node"

To fix ungoogled-chromium icloud password not working

ungoogled-software/ungoogled-chromium-macos#144 (comment)

echo '{
    "name": "com.apple.passwordmanager",
    "description": "PasswordManagerBrowserExtensionHelper",
    "path": "/System/Cryptexes/App/System/Library/CoreServices/PasswordManagerBrowserExtensionHelper.app/Contents/MacOS/PasswordManagerBrowserExtensionHelper",
    "type": "stdio",
    "allowed_origins": [
        "chrome-extension://pejdijmoenmkgeppbflobdenhhabjlaj/",
        "chrome-extension://mfbcdcnpokpoajjciilocoachedjkima/"
    ]
}' > ~/Library/Application\ Support/Chromium/NativeMessagingHosts/com.apple.passwordmanager.json