Skip to content

y3owk1n/nix-system-config-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

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

Getting localhostname

scutil --get LocalHostName

Getting username

whoami

Switch to fish shell

chsh -s (which fish)

Build nix to results

Prebuilt script

The following script will initialise the function above and install additional node packages too.

bash ~/nix-system-config-v2/scripts/init.sh

Manually

// run this at the root of this directory
nix run nix-darwin -- switch --flake ~/nix-system-config-v2/.#Kyles-MacBook-Air

Initialise darwin rebuild

darwin-rebuild switch --flake ~/nix-system-config-v2

Cleanup

// Cleanup nix
bash ~/nix-system-config-v2/scripts/nix-cleanup.sh

// Cleanup neovim
bash ~/nix-system-config-v2/scripts/nvim-reset.sh

Installing NPM packages that are not available in Nix

Prebuilt sript

bash ~/nix-system-config-v2/scripts/install-node-packages.sh

Manually

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"

Karabiner Driverkit

https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice/releases/download/v3.1.0/Karabiner-DriverKit-VirtualHIDDevice-3.1.0.pkg
// Activate
/Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Manager activate
// Restart kanata
sudo launchctl unload /Library/LaunchDaemons/org.nixos.kanata.plist
sudo launchctl load /Library/LaunchDaemons/org.nixos.kanata.plist

About

My Personal Nix System Configuration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published