top-level configurations for all my NixOS machines
Go to file
Colin 371fc689f5 WIP: mootube: init at 2022-08-28 2023-11-29 07:36:01 +00:00
doc document how to ship programs 2023-07-11 08:11:48 +00:00
hosts mpv: associate with opus mimetype 2023-11-29 01:14:15 +00:00
integrations/nur flake: add "check-nur" app to validate that my repo passes NUR checks 2023-06-26 01:26:13 +00:00
modules feeds: econlib: update feed URL 2023-11-26 02:17:36 +00:00
nixpatches slskd: fix that the nixos module unconditionall enables nginx 2023-11-28 14:08:08 +00:00
overlays ripgrep: send cross compilation patch upstream 2023-11-28 00:33:13 +00:00
pkgs WIP: mootube: init at 2022-08-28 2023-11-29 07:36:01 +00:00
scripts scripts: move these to more appropriate places 2023-07-02 22:49:17 +00:00
secrets servo: enable Soulseek 2023-11-28 11:46:47 +00:00
templates begin packaging for bonsai (incomplete) 2023-05-18 01:31:06 +00:00
.gitignore rename working -> .working 2023-11-23 03:29:04 +00:00
.sops.yaml sops: fix key map after universal -> common rename 2023-05-16 07:19:09 +00:00
README.md sxmo-utils: rename from sxmo-utils-latest 2023-11-19 23:44:48 +00:00
TODO.md sync todo.md 2023-11-24 08:20:03 +00:00
default.nix bypass-paywalls-clean: 3.2.5.0 -> 3.3.4.0; lay the foundation for updateScripts in this repo 2023-09-22 10:13:56 +00:00
flake.lock nixpkgs: 2023-11-27 -> 2023-11-28, sops-nix -> 2023-11-27 2023-11-28 14:16:22 +00:00
flake.nix flake: fix "update" for my newer overlay schema 2023-11-26 02:16:25 +00:00

README.md

What's Here

this is the top-level repo from which i configure/deploy all my NixOS machines:

  • desktop
  • laptop
  • server
  • mobile phone (Pinephone)

everything outside of <./hosts/> and <./secrets/> is intended for export, to be importable for use by 3rd parties. the only hard dependency for my exported pkgs/modules should be nixpkgs. building <./hosts/> will require sops.

you might specifically be interested in these files (elaborated further in #key-points-of-interest):

Using This Repo In Your Own Config

this should be a pretty "standard" flake. just reference it, and import either

  • nixosModules.sane (for the modules)
  • overlays.pkgs (for the packages)

or follow the instructions here to use it via the Nix User Repositories.

Layout

  • doc/
    • instructions for tasks i find myself doing semi-occasionally in this repo.
  • hosts/
    • the bulk of config which isn't factored with external use in mind.
    • that is, if you were to add this repo to a flake.nix for your own use, you won't likely be depending on anything in this directory.
  • integrations/
    • code intended for consumption by external tools (e.g. the Nix User Repos)
  • modules/
    • config which is gated behind enable flags, in similar style to nixpkgs' nixos/ directory.
    • if you depend on this repo, it's most likely for something in this directory.
  • nixpatches/
    • literally, diffs i apply atop upstream nixpkgs before performing further eval.
  • overlays/
    • exposed via the overlays output in flake.nix.
    • predominantly a list of callPackage directives.
  • pkgs/
    • derivations for things not yet packaged in nixpkgs.
    • derivations for things from nixpkgs which i need to override for some reason.
    • inline code for wholly custom packages (e.g. pkgs/additional/sane-scripts/ for CLI tools that are highly specific to my setup).
  • scripts/
    • scripts which aren't reachable on a deployed system, but may aid manual deployments
  • secrets/
    • encrypted keys, API tokens, anything which one or more of my machines needs read access to but shouldn't be world-readable.
    • not much to see here
  • templates/
    • exposed via the templates output in flake.nix.
    • used to instantiate short-lived environments.
    • used to auto-fill the boiler-plate portions of new packages.

Key Points of Interest

i.e. you might find value in using these in your own config:

  • modules/fs/
    • use this to statically define leafs and nodes anywhere in the filesystem, not just inside /nix/store.
    • e.g. specify that /var/www should be:
      • owned by a specific user/group
      • set to a specific mode
      • symlinked to some other path
      • populated with some statically-defined data
      • populated according to some script
      • created as a dependency of some service (e.g. nginx)
    • values defined here are applied neither at evaluation time nor at activation time.
      • rather, they become systemd services.
      • systemd manages dependencies
      • e.g. link /var/www -> /mnt/my-drive/www only after /mnt/my-drive/www appears)
    • this is akin to using Home Manager's file API -- the part which lets you statically define ~/.config files -- just with a different philosophy.
  • modules/persist/
    • my alternative to the Impermanence module.
    • this builds atop modules/fs/ to achieve things stock impermanence can't:
      • persist things to encrypted storage which is unlocked at login time (pam_mount).
      • "persist" cache directories -- to free up RAM -- but auto-wipe them on mount and encrypt them to ephemeral keys so they're unreadable post shutdown/unmount.
  • modules/programs.nix
    • like nixpkgs' programs options, but allows both system-wide or per-user deployment.
    • allows fs and persist config values to be gated behind program deployment:
      • e.g. /home/<user>/.mozilla/firefox is persisted only for users who sane.programs.firefox.enableFor.user."<user>" = true;
  • modules/users.nix
    • convenience layer atop the above modules so that you can just write fs.".config/git" instead of fs."/home/colin/.config/git"

some things in here could easily find broader use. if you would find benefit in them being factored out of my config, message me and we could work to make that happen.

Mirrors

this repo exists in a few known locations:

Contact

if you want to contact me for questions, or collaborate to split something useful into a shared repo, etc, you can reach me via any method listed here. patches, for this repo or any other i host, will be warmly welcomed in any manner you see fit: git send-email, DM'ing the patch over Matrix/Lemmy/ActivityPub/etc, even a literal PR where you link me to your own clone.