Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shaunsingh/nix-darwin-dotfiles

Dotfiles managed via Nix-Darwin and Mk-Darwin-System, for schoolwork and kotlin, lua, and rust programming
https://github.com/shaunsingh/nix-darwin-dotfiles

doom-emacs emacs-configuration neovim-lua nix nix-darwin nix-flake

Last synced: 12 days ago
JSON representation

Dotfiles managed via Nix-Darwin and Mk-Darwin-System, for schoolwork and kotlin, lua, and rust programming

Awesome Lists containing this project

README

        

#+title: Nix-Darwin-Dotfiles
#+subtitle: Dotfiles managed via [[https://github.com/LnL7/nix-darwin][Nix-Darwin]], and [[https://github.com/nix-community/home-manager][Home-Manager]]
#+author: shaunsingh

* Images
[[./extra/assets/out.png]]

* Installing and notes

** Linux
NOTE: the linux config is specifically set up for a 7th gen x1 carbon, and depends on my emacs configuration. Don't use this unless you know what you're doing. You're likely here for the MacOS flake, if so just skip on ahead!
#+begin_src sh
nix-shell -p nixUnstable git
nixos-install --flake https://github.com/shaunsingh/nix-darwin-dotfiles#shaunsingh-thinkpad
#+end_src

** MacOS
*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
#+begin_src sh :comments both :tangle "./extra/install.sh" :shebang "#!/bin/bash"
sh <(curl -L https://nixos.org/nix/install) --daemon
#+end_src
Launch an ephemeral shell with git, nixUnstable, and Emacs
#+begin_src sh :comments both :tangle "./extra/install.sh" :shebang "#!/bin/bash"
nix-shell -p nixUnstable emacs
#+end_src
Tangle the =.org= files (not needed, but recommend in case I forgot to update tangled files)
#+begin_src sh :comments both :tangle "./extra/install.sh" :shebang "#!/bin/bash"
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\"))"
#+end_src
(if emacs asks you for comment syntax, put `# ` for everything)
Build, and switch to the dotfiles
#+begin_src sh :comments both :tangle "./extra/install.sh" :shebang "#!/bin/bash"
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
#+end_src
(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
#+begin_src sh :comments both :tangle "./extra/install.sh" :shebang "#!/bin/bash"
ln -s ~/nix-darwin-dotfiles/configs/doom/ ~/.config/doom
#+end_src
Install doom emacs
#+begin_src sh :comments both :tangle "./extra/install.sh" :shebang "#!/bin/bash"
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.config/emacs
~/.config/emacs/bin/doom install
#+end_src

* Feedback
Suggestions/improvements
[[https://github.com/shaunsingh/vimrc-dotfiles/issues][welcome]]!