Flake migration based on https://github.com/sebastiant/dotfiles.
Create ./scripts/apply.sh and set appropriate build command. See flake.nix for available options.
File content should look like this:
#!/bin/bash
export NIXPKGS_ALLOW_UNFREE=1
## macbook
#nix build '.#homeManagerConfigurations.macbookMain.system' --experimental-features 'nix-command flakes' --impure
# linux
nix build '.#homeManagerConfigurations.workstation.activationPackage' --experimental-features 'nix-command flakes' --impure
if [[ $(uname -s) == 'Darwin' ]]; then
sudo ./result/activate
elif [[ $(uname -s) == 'Linux' ]]; then
./result/activate
fimake common
# optional
make common-devIf nix gc borks rust, run following commands:
rustup show
rustup toolchain remove $toolchain_version
rustup install 1.90.0echo "$(whoami) ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/99-nopasswd-$(whoami)- Login to
App Store make mac
- If you need
tailscale,caddy,fail2ban, ordockeron your server, install it via your system's package manager, since nix requires you to set up systemd services explicitly.
`chsh` and type `$HOME/.nix-profile/bin/fish`
# or this one
`vi /etc/passwd` and specify shell for your user- set
tap to single click - set
three-finger drag
# backup vscode extensions list
code --list-extensions | xargs -L 1 echo code --install-extension > ext_install.sh
# backup vscode config
cp "/users/$USER/Library/Application Support/Code/User/keybindings.json" .
cp "/users/$USER/Library/Application Support/Code/User/settings.json" .