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pkgs, ... }:letuserName = "<username>";homeDirectory = "/Users/<username>";users.users."${userName}" = {name = "${userName}";home = "${homeDirectory}";};# this is responsible for hooking up all of our home-manager confighome-manager.users."${userName}" = { pkgs, ... }: {imports = [ ../home.nix ];};}in{
letuserName = "<PUT_YOUR_USERNAME>";in{userName = userName;homeDirectory = "/Users/${userName}";}
``` shsh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon```* [install nix-darwin](https://github.com/LnL7/nix-darwin#install "nix-darwin-install-instructions") if on macos
- NOTE: double check all the install commands if something goes wrong, things may have changed upstream
* [install home-manager](https://github.com/nix-community/home-manager#installation) follow the instructions at the link* if on macos also follow the instructions for [integrating home-manager as a nix-darwin module](https://nix-community.github.io/home-manager/index.html#sec-install-nix-darwin-module "home-manager-nix-darwin-module")* clone this repo``` shgit clone https://github.com/averagechris/dotfiles.git```* create `localhome/default.nix` based on `localhome/example.nix`
- on recent versions of macos you'll need to add a special flag
``` shcp ~/dotfiles/nixpkgs/localhome/example.nix ~/dotfiles/nixpkgs/localhome/default.nix```* modify `localhome/default.nix` according to the needs of the system (like choosing what to install and some PII info)
```shellsh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon```
* create `darwin/local_config.nix` based on `darwin/example_local_config.nix```` shellcp ~/dotfiles/nixpkgs/darwin/example_local_config.nix ~/dotfiles/nixpkgs/darwin/local_config.nix```* modify `darwin/local_config.nix` by adding the right user name and home directory
- [install nix-darwin](https://github.com/LnL7/nix-darwin#install "nix-darwin-install-instructions") if on macos```shellnix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer./result/bin/darwin-installer```- [install home-manager](https://github.com/nix-community/home-manager#installation) follow the instructions at the link- if on macos also follow the instructions for [integrating home-manager as a nix-darwin module](https://nix-community.github.io/home-manager/index.html#sec-install-nix-darwin-module "home-manager-nix-darwin-module")
* build the configuration* for non-macos* if on non-macos``` shhome-manager switch
- create `localhome/default.nix` based on `localhome/example.nix````shellcp ~/dotfiles/nixpkgs/localhome/example.nix ~/dotfiles/nixpkgs/localhome/default.nix
* if on macos (only the first call to darwin-rebuild requires the darwin-config argument)``` sh
- modify `localhome/default.nix` according to the needs of the system (like choosing what to install and some PII info)- create `darwin/pii.nix` based on `darwin/example_pii.nix````shellcp ~/dotfiles/nixpkgs/darwin/pii.nix ~/dotfiles/nixpkgs/darwin/pii.nix```- modify `darwin/pii.nix` by adding the right user name and home directory- symlink `~/dotfiles/nixpkgs` to `~/.config/````shellln -fs ~/dotfiles/nixpkgs ~/.config/```- build the configuration- for non-macos```shellhome-manager switch```- if on macos (only the first call to darwin-rebuild requires the darwin-config argument)```shell
```* finish installing emacs dependencies by starting emacs and running the following functions* `all-the-icons-install-fonts` to install the fonts used for icons* `emojify-download-emoji` to be able to display emoji characters
```
* move start_scripts to home-manager* emacsMacport does not have a gui launcher add one upstream or make a wrapper, right now you have to use `open -a ~/.nix-profile/Applications/Emacs.app` and start the server from within emacs, you can't do `emacs --daemon` that doesn't work (should fix that as well at somepoint)
- move start_scripts to home-manager- emacsMacport does not have a gui launcher add one upstream or make a wrapper, right now you have to use `open -a ~/.nix-profile/Applications/Emacs.app` and start the server from within emacs, you can't do `emacs --daemon` that doesn't work (should fix that as well at somepoint)
* `rm -rf /nix`* if you get an error on macos remove nix from `/synthetic.conf` and try again* on macos use disk utility app to delete the `nix` apfs volume* restart system* nix is now gone completely so you can follow the install instructions to start over
- `rm -rf /nix`- if you get an error on macos remove nix from `/synthetic.conf` and try again- on macos use disk utility app to delete the `nix` apfs volume- restart system- nix is now gone completely so you can follow the install instructions to start over
* tl;dr; these can sometimes replace the changes necessary in `/etc/zprofile` and `/etc/zshrc` meaning we need to intervene manually.``` sh
- tl;dr; these can sometimes replace the changes necessary in `/etc/zprofile` and `/etc/zshrc` meaning we need to intervene manually.```sh
/nixpkgs/darwin/pii.nix