* Introduction ToughNix is a configuration that centers around the usage of NixOS and Emacs, with vim-centric keybindings. Note that at the time of writing, This entire configuration uses the [[https://github.com/catppuccin/catppuccin][catppuccin theme]]. ** Why Not EXWM? Because emacs is blocking, and I want to use wayland because it's much better and there's much less cruft. * Installation Install NixOS, install git (and maybe vim) on your NixOS system, and then on your NixOS system, run: #+begin_src shell mkdir -p ~/src git clone https://git.nullring.xyz/toughnix.git ~/src/ # Change any system variables that are hardware or person-dependent (do this before inital-deploy) nano ~/src/toughnix/vars.nix bash ~/src/toughnix/initial-deploy.sh # remove the single CHANGEME line nano ~/src/toughnix/configuration.nix sudo nix --extra-experimental-features nix-command --extra-experimental-features flakes flake update sudo nixos-rebuild switch --flake .#continuity-dell #+end_src Note the line where we run ~nano~; during this period you should change any hardware or person-specific settings, and also alter ~configuration.nix~ more if you are using an encrypted drive. After this process, reboot and log into your user. You will immediately be taken into Hyprland, and Emacs and Firefox will autostart. * Usage On your first install, you will be greeted with firefox, as well as EMacs. If Waybar doesn't appear, run ~hyprctl monitors~ in a terminal (Windows key + Enter), and you should see the monitors listed. Then, edit ~/etc/nixos/vars.nix~ accordingly. ** Hyprland *** Wallpaper To change the wallpaper, change the ~swww add~ line in ~home.nix~ to another wallpaper in my [[https://github.com/ret2pop/wallpapers][wallpapers repository]]. *** Keybindings **** Programs There are other programs too, but these are all you'll need to get started. #+begin_example Win + Return => kitty (Terminal) Win + e => emacs Win + w => firefox Win + v => discord (vencord) Win + d => wofi (Run Launcher) Win + p => wofi (Powermenu) PrintScr => grim (screenshot; look for file in $HOME) #+end_example **** Commands These commands are inspired by ~vim~. #+begin_example Win + q => kill window Win + Shift + h => move window to left Win + Shift + l => move window to right Win + Shift + k => move window up Win + Shift + j => move window down Win + h => move window focus to left Win + l => move window focus to right Win + k => move window focus up Win + j => move window focus down #+end_example ** Passwords Passwords will be managed by sops-nix in the future, but for now they are managed with the ~pass~ password manager. To initialize the password store, see [[https://www.passwordstore.org/][the documentation]]. Be sure to add an entry called ~Mail~: #+begin_src shell pass add Mail #+end_src and enter your imaps and smtps password (they should be the same in this setup). ** Email Email is done from within emacs with mu4e with ~SPC o m~. To initialize mail, run: #+begin_src shell mbsync ret2pop # see mbsyncrc section of home.nix, change ret2pop to something else there # then run this command with that changed name, if you really want. # Even though it uses my username, it works for everyone. mu init --maildir=~/email/ret2pop/ mu index #+end_src Note that a prerequisite is initializing ~pass~ and adding a ~Mail~ entry. Be sure to change the imaps and smtps address in the mbsync and msmtp configurations as well as the usernames. ** Firefox On launch, make sure you enable all the plugins by going into the three bar tab on the right corner and enabling all the automatically installed extensions. Then, optionally, visit the [[https://github.com/catppuccin/firefox][catppuccin firefox theme]] website and use the Firefox Color install method. ** Discord Optionally, go to user settings > Vencord > Themes > Online Themes. Then, install [[https://github.com/catppuccin/discord][this theme]] by pasting the one-liner in: #+begin_src css @import url("https://catppuccin.github.io/discord/dist/catppuccin-mocha-pink.theme.css"); #+end_src ** Waybar If the bar is not displaying, get your monitor name with ~hyprctl monitors~. The battery percentage may not be displayed. If it isn't, then change ~BAT0~ with whatever you see when you run ~ls /sys/class/power_supply~, assuming you have a laptop with a battery. After that, it should work normally. ** Music Place your music files in ~$HOME/music~ and run ~mpc update~, then ~mpc add /~. This should add all your music in ~$HOME/music~ to the playlist to be read by the emacs program ~emms~. ** Emacs On first initialization, make sure to run: #+begin_src emacs-lisp M-x pdf-tools-install M-x all-the-icons-install-fonts M-x nerd-icons-install-fonts #+end_src then restart. This will make emacs look not ugly. Also edit the very top of ~~/org/website/config/emacs.org~, modify the parameters (email, full name, etc...) to your desired value. *** Keybindings These are the keybindings that I have set up for emacs. All the other keybindings are ones that are default to the packages installed or the builtin emacs keybindings. Note that I also use evil-mode, so you're going to have to know vim keybindings. To get started with editing files, press space, and then press period. #+begin_example SPC . find-file SPC o a org-agenda SPC c b counsel-bookmark SPC o c org-capture SPC n j j org-journal-new-entry SPC n r f org-roam-node-find SPC n r i org-roam-node-insert SPC n r g org-roam-graph SPC r s s elfeed SPC . counsel-find-file SPC g / magit-dispatch SPC g P magit-push SPC g c magit-commit SPC g p magit-pull SPC o t vterm-other-window SPC o e eshell SPC o m mu4e SPC e w w eww SPC e c c ellama-chat SPC e a b ellama-ask-about SPC e s ellama-summarize SPC e c r ellama-code-review SPC e c C ellama-code-complete SPC e c a ellama-code-add SPC e c e ellama-code-edit SPC e w i ellama-improve-wording SPC e g i ellama-improve-grammar SPC p w ivy-pass SPC m P p org-publish SPC s e sudo-edit SPC m m emms SPC f f Format code buffer SPC i c Connect to my IRC server SPC h m Manual SPC h r r Reload Config #+end_example *** IRC In the config, replace the IRC configuration (server and name) with your own. *** ellama Run ~ollama pull zephyr~ to get the zephyr ollama model. *** Mu4e After following the email advice from above, change my mail address and name to your own. *** Elfeed Change my RSS feeds out in ~$HOME/org/website/config/elfeed.org~ with ones you want to read. ** Website I update my website with the command ~usite~ (in the terminal). This will work by default if you set your ~vars.nix~ correctly and you have access to the server you're sshing through with rsync. ** Postamble Once you've done all those things, you can call the system yours! If you want to change anything about the system or fork it to remove any mention of me from the defaults, be my guest. If you want it to contain parts of my identity, that's also good.