This is a fork from kclejeune/system. Thank you @kclejeune for helping me set it up. Due to the complexity of the original repo (well, just for me), my intention is to simplify the set up and also learn me some Nix on the way
NOTE: I'm using macOS and haven't tested Linux config.
- Install
Nix
:
# multi-user
sh <(curl -L https://nixos.org/nix/install) --daemon
- Clone this repo
git clone https://github.com/bangedorrunt/nix.git ~/.nixpkgs
- Update
NOTE: remove flake.lock
if existed
cd ~/.nixpkgs
nix-channel --update
nix flake update --experimantal-features 'nix-command flakes'
- Build
nix build .\#brunetdragon@x86_64-darwin
For single-user mode:
- Remove Nix from
sudo vifs
- Remove Nix from
/etc/synthetic.conf
- Open
Disk Utility
app, deleteNix Store
volume - Restart your device
sudo rm -rf /nix
For multi-user mode
- Remove Nix from
sudo vidfs
- Remove Nix from
/etc/synthetic.conf
sudo rm -rf /etc/nix ~root/.nix-profile ~root/.nix-defexpr ~root/.nix-channels ~/.nix-profile ~/.nix-defexpr ~/.nix-channels
sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo rm /Library/LaunchDaemons/org.nixos.nix-daemon.plist
- Open
Disk Utility
app, deleteNix Store
volume - Restart your device
sudo rm -rf /nix
- Open
System Preference | Users and Groups
, deleteNixbuild
group