12

GitHub - shaunsingh/nix-darwin-dotfiles: Dotfiles managed via Nix-Darwin and Mk-...

 2 years ago
source link: https://github.com/shaunsingh/nix-darwin-dotfiles
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Nix-Darwin-Dotfiles

HTML Version

PDF Version

Images

Terminal & Bar setup

https://preview.redd.it/hh4ptgc0mis71.png?width=960&crop=smart&auto=webp&s=57e885e766cf0d0e2c7709a6be9862ea47103577 https://media.discordapp.net/attachments/635625917623828520/897351007485456434/unknown.png?width=1872&height=1170

Doom-emacs

https://media.discordapp.net/attachments/635625917623828520/899385681506369536/unknown.png?width=2160&height=911 https://media.discordapp.net/attachments/635625917623828520/901903542619615272/unknown.png?width=1892&height=1171

Neovim

https://media.discordapp.net/attachments/794365077754085387/907837547982516234/Screen_Shot_2021-11-09_at_22.40.28.png?width=1836&height=1169

Installing and notes

NOTE: These are available as an executable script ./extra/install.sh

Install Nix. I have it setup for multi-user, but you can remove the --daemon if you want a single user install

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

Launch an ephemeral shell with git, nixUnstable, and Emacs

nix-shell -p nixUnstable emacs

Tangle the .org files (not needed, but recommend in case I forgot to update tangled files)

git clone --depth 1 https://github.com/shaunsingh/nix-darwin-dotfiles.git ~/nix-darwin-dotfiles/ && cd ~/nix-darwin-dotfiles
emacs --batch --eval "(progn (require 'org) (setq org-confirm-babel-evaluate nil) (org-babel-tangle-file \"~/nix-darwin-dotfiles/nix-config.org\"))"
emacs --batch --eval "(progn (require 'org) (setq org-confirm-babel-evaluate nil) (org-babel-tangle-file \"~/nix-darwin-dotfiles/configs/doom/config.org\"))"

(if emacs asks you for comment syntax, put `# ` for everything) Build, and switch to the dotfiles

nix build ~/nix-darwin-dotfiles\#darwinConfigurations.shaunsingh-laptop.system --extra-experimental-features nix-command --extra-experimental-features flakes
./result/sw/bin/darwin-rebuild switch --flake .#shaunsingh-laptop

(note, --extra-experimental-features is only needed the first time around. After that the configuration will edit /etc/nix/nix.conf to enable flakes and nix-command by default) Symlinking with nix (and managing doom with nix-doom-emacs) is very finicky, so for now we need to manually symlink them

ln -s ~/nix-darwin-dotfiles/configs/doom/ ~/.config/doom

Install doom emacs

git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.config/emacs
~/.config/emacs/bin/doom install

Feedback

Suggestions/improvements welcome!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK