Skip to content

My configurations and dotfiles for Nix, Emacs, GNU/Linux and software I use

License

Notifications You must be signed in to change notification settings

jjba23/dotfiles

Repository files navigation

Joe’s dotfiles

These are my configuration files, which also explain a lot about the tooling I use and enjoy, and can teach you a thing or two.

If you like my work, please support me by buying me a cup of coffee ☕ so I can continue with a lot of motivation.

This is the set of files that powers my day-to-day computing experience, so do not track my dotfiles (rolling, unstable, and untested), but feel free to use them and take inspiration from them.

NixOS GNU Emacs Haskell GTK

In some ways this is a laboratory of experimentation for my computing environment. What I do with any other program that forms part of my dotfiles is only meant to work for me. As such, I may introduce breaking changes without prior notice.

This is all to say that you understand the risks associated with tracking an ever-changing project that does not enjoy widespread testing and whose target audience is only me. If you are fine with that and are willing to assume responsibility for any possible breakage, then please feel welcome to follow along. You can always open an issue here or contribute any fixes, if you will.

Note: Screenshot below might be outdated and no longer representative of the current, everchanging state of these dotfiles.

Using

If you are a Nix connaisseur, you will likely immediately know what to do and have no questions here.

Otherwise, for convenience, I have written some Haskell code that automates my usage of these dotfiles. See Main.hs for more. This should be highly readable to everyone, even if you are not familiar with Haskell.

An example of how to deploy this config in a fully automated fashion:

# optionally run `cabal update` first
cabal run dotfiles -- rebuild-system
# or using cabal and GHC from the flake
nix develop -c cabal run dotfiles -- rebuild-system

Available tasks

rebuild-system
rebuild the entire NixOS + HomeManager flake config, deployed to /etc/nixos
update-system
update the NixOS flake inputs

See my Haskell glue code (for example at ./Main.hs or at ./buildscript) for more information about how I deploy, build and use my NixOS configuration.

Showcase

Screenshot of Joe's setup

This is an ever changing setup, so only by using it can you see its latest evolutionary stage. In any case, see the folder at resources/screenshots/ for screenshots.

See some Reddit posts where the setup is shown:

My way of installing NixOS

I like to carry around a USB drive with me that contains a NixOS Live ISO. I boot from it, rather using EFI than legacy bios, and then usually just choose GNOME desktop and manual partitioning, with:

  • a GUID/GPT partition table
  • a 1024MB FAT32 partition as ESP/EFI, with the mountpoint /boot and the boot flag
  • a BTRFS root filesystem, encrypted with LUKS, and with mountpoint /.
  • install bootloader to /boot

Note you might get a warning about this type of partitioning, but you can pretty much safely ignore it as this is quite a safe way to partition. Even safer would be to also encrypt the /boot but that brings a whole lot more challenges. If running on virtual machines, you might need to turn off 3D acceleration for the installation process.

Per host

There are some “host-specific” configurations to be turned on or off depending on the system. Define a file at ./per-host.nix with some Nix expression like:

{ }

You may specify per host settings in the following fashion:

{
  masterOptions.proprietaryNvidia.enable = true;
  masterOptions.joe.lightMode.enable = true;
  masterOptions.defaultSession = "gnome";
}

See options.nix file for more details on all possibilities.

Why would I want my dotfiles in version control?

Having your dotfiles and configurations in version control allows you to backup, restore, and sync the preferences and settings for your toolbox. Your dotfiles might be the most important files on your machine.

You can then also learn from the community and spread the knowledge. Discover new tools for your toolbox and new tricks for the ona you already use.

For maximum profit and reproducibility you should use NixOS and/or the nix package manager.

Copyright and licensing

Copyright © 2024 Josep Jesus Bigorra Algaba (jjbigorra@gmail.com)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Project management - backlog

Improve cheatsheet and export to org/markdown automatically