- About
- Design choices
- Software
- Installation
- Troubleshooting
- Impurities
- Resources
- Credits & Special thanks
tensorfiles represent a set of fully covariant, that is invariant to the chosen coordinate system (they work on every machine), fundamental laws of computing (how to build my fancy flashy terminals) ☁️
Some of the machines/packages present in this repository are also prebuilt in the following binary cache
nixConfig = {
extra-substituters = [
"https://tsandrini.cachix.org"
];
extra-trusted-public-keys = [
"tsandrini.cachix.org-1:t0AzIUglIqwiY+vz/WRWXrOkDZN8TwY3gk+n+UDt4gw="
];
};
The project is also hosted on FlakeHub.
- This projects is generated via and uses flake-parts-builder which makes it super easy to share modularity between different projects.
- Modules are disabled by default. Why you might ask? 🤓 ... Setting
myModule.enable = true;
can be done from multiple places, moreover we can even assign priorities to these expressions (by utilisinglib.mkOverride
), however, we can import a given module once and only once ... additional imports will yield errors. This behaviour makes it hard to reason about the dependencies of individual modules, which is why I opted for the behaviour -- import everything and enable only the parts that you need. - Use profiles to define and share common configurations packs. Profiles typically don't create and add any new functionality but instead preconfigure stuff.
- Isolate home manager functionality in such a way so it can be used in non NixOS environments 👥
- I prefer to only use
inputs
andsystem
variables instead of the more convenientinputs'
andself'
of flake-parts due to the code being easier to copy and transfer to older non flake-parts codebases.
I have a bunch of machines running some nix or directly NixOS with a variety of setups. To discern between them but still use the same base I use nixos/hm modules and their appropriate profiles.
- org-roam: This is the heart of everything that I
do, TODOs, daily journals, scratchpads, notetaking and personal research wiki.
The internal wiki is interlinked with zotero entries as well as anki cards.
- TODOs: org-agenda
- visualization: org-roam-ui
- anki connection: org-anki-editor
- zotero: This is my backend for all of my
bibliography as well as the individual
.pdf
files. As of now I keep them up to date between machines using syncthing, but I’ll probably set up a personal cloud when I’ll have spare time. - anki: Since I have the memory of worm I try to keep my long-term memory of different subjects fresh using flashcards. I sync the cards using ankis official cloud.
For my day to day passwords I use a locally synced keepassxc encrypted database and for the NixOS based secrets I use agenix. I also try to avoid using any globally available pubkeys and rather tend to use machine specific ones instead (for obvious reasons).
Note: plz no pwn xd, if you see any vulnerabilities please, send me a mail at [email protected]
TODO
If you get any error of this kind during the installation of this flake
you have most likely run out of $TMPDIR
space. This is usually due
to $TMPDIR
being set up as a RAM based tmpfs and thus not having enough
RAM for nix store cache during installation.
The most clean & general solution to this would be to create a minimal
based installation and then run a nixos-rebuild
(and I still might do that)
but that kind of defeats the purpose of what I am aiming for which would be
to run nixos-install
, a single command, and end up with a fully prepared
system.
Considering that a quick workaround is to navigate $TMPDIR
to a different
folder (this might slow the installation process if you redirect it to a
spinning disk tmp filesystem, however, assuming you have a decent bandwidth
is’s still just by minutes)
mkdir -p /mnt/tmp
USER=$USER TMPDIR="/mnt/tmp" nixos-install --root /mnt --flake .#$HOST
A different solution in case you have more spare RAM would be to remount tmpfs, for example
mount -o remount,size=15G /tmp
I heavily dislike using the --impure
flag, which is unfortunately required
in certain use cases, and I go really out of my way to patch stuff and
avoid using it.
- none! 🚀🚀
- shadow-nix and all its forks rely on impure imports of hashes, so I am maintaining my own fork tsandrini/shadow-nix
- I was previously using devenv, however, it still doesn't work really well in a pure mode, so switched to a simple devshell instead.
The whole nix ecosystem is in its foundations a revolutionary piece of software and once you get the hang of it you feel like you’ve really conquered the art of computer wizardry, however, it’s so different from everything that is the current status quo of compsci and thus needs appropriate extensive documentation/tutorials/etc… which is, however, currently not the case.
Due to this exact reason I’m leaving here a list of resources/flakes that helped me to (somewhat) learn the ways of nix (TODO: maybe write more? manual.org?)
- Nix Pills: obligatory pills
- NixOS search: this should be your homepage really
- Home-Manager opts search: the same search but for home-manager, secondary homepage tbh
- hlissner/dotfiles: great resource for learning how to appropriately modularize code
- notusknot/dotfiles-nix: a more straightforward config but with all the needed parts, great introduction to flakes, home-manager
- Nix Cookbook: custom scripts, package wrapper scripts
- balsoft/nixos-config: more modularized but not overly complicated config
- A really nice blogpost/tutorial on encrypted nixos opt-in system using btrfs
- Github code search: thanks to how the nix lang works the code search should be of a huge help, included an example
- This is where flake-parts finally clicked for me, huge thanks to viperml~~
- dc-tec/nixvim awesome nixvim config that got me started
To reiterate the previous Resources section, here are also some explicit shoutouts & thanks to the people from whom I have at some point in time taken some piece of code or have been inspired from. Huge thanks ❤️
These are people that are engrained in the nix community and whose work I/we use on a daily basis. I hope they will happily continue to be a part of the nix community and I thank them for all of their contributions.
edolstra -- grahamc -- domenkozar -- Mic92 -- hlissner -- viperML -- roberth -- fufexan -- NobbZ
Additional help with certain specific areas, inspiration or code snippets.