personal nixos repo
Go to file
xenia 6c317f6a79 gitSource: fix bug whoops 2024-06-05 00:38:33 -04:00
lib gitSource: fix bug whoops 2024-06-05 00:38:33 -04:00
modules/ghidra-server ghidra-server: assert is unneeded 2024-04-23 17:23:02 -04:00
pkgs pkgs: add outer-wilds-text-adventure 2024-05-30 16:01:42 -04:00
support create documentation rendering derivation 2024-04-09 17:24:56 -04:00
.gitignore create documentation rendering derivation 2024-04-09 17:24:56 -04:00
LICENSE.txt add readme and license 2024-04-07 18:28:42 -04:00 gitSource: add subdir option 2024-06-05 00:34:50 -04:00 add feedvalidator 2024-04-23 18:12:23 -04:00
default.nix pkgs: add outer-wilds-text-adventure 2024-05-30 16:01:42 -04:00

Table of Contents


this is my personal nixos modules and packages repository. while it was designed for my own use, it's also intended to be flexible and reusable enough for general purpose usage. i might consider upstreaming into nixpkgs if there is sufficient interest


dragnpkgs provides a set of nixos modules and a nixpkgs overlay containing custom packages (automatically applied). to use, import the top-level module into your system configuration, eg

{config, lib, pkgs, ...}:
  imports = [

alternatively, add it as a nix channel

nix-channel --add dragnpkgs

then in system config

{config, lib, pkgs, ...}:
  imports = [

for standalone nix on other distros, use ~/.config/nixpkgs/overlays.nix to enable the dragnpkgs overlay

(import <dragnpkgs> {}).nixpkgs.overlays

options documentation

documentation for options provided by dragnpkgs


the shared project server for ghidra

example usage:

services.ghidra-server = {
  enable = true;
  host = "your.domain.or.ip";


enables the ghidra server service


adds a system package for the CLI tool ghidra-svrAdmin, which allows anyone in the ghidra group to administer the server (this corresponds to the server/svrAdmin tool in the stock ghidra distribution)

services.ghidra-server.{package, jdkPackage} (ghidra_headless, openjdk17_headless)

allows overriding the ghidra package and jdk package used for the server

the server hostname or IP; this is typically required (by java RMI) for correct operation

services.ghidra-server.basePort (13100)

the server will use 3 consecutive TCP ports starting from this port (ghidra-server)

the root directory for server files, as a subdirectory of /var/lib. this is needed because this option is passed to systemd StateDirectory=

services.ghidra-server.{user,group} (ghidra)

the service user and group

more coming soon(tm)

packages documentation


a variant of ghidra built with a headless openjdk, intended to reduce closure size for server operation


opinionated ppx for string literals:


logging for cats, in ocaml:

python312Packages.feedvalidator or feedvalidator

the W3C atom/RSS feed validator library,

this package comes with an additional CLI bin, feedvalidator, which is a simple wrapper around the library that enables CLI usage


usage: feedvalidator [-h] [-b BASE] file

W3C feedvalidator

positional arguments:
  file                  File to validate

  -h, --help            show this help message and exit
  -b BASE, --base BASE  Base URL of document


feedvalidator --base "https://my-base-url/atom.xml" path/to/atom.xml


nix packaging for the Outer Wilds text adventure game. it should work by default on NixOS. if using the nix package manager on a non-NixOS computer, you also need the following when using pipewire or another ALSA plugin that lives in a separate package

export ALSA_PLUGIN_DIR=$(nix eval -f '<nixpkgs>' --raw pipewire)/lib/alsa-lib

lib documentation


a fetcher that downloads binaries from Steam using DepotDownloader. this is intended for game servers that are distributed via Steam. use SteamDB to get the needed IDs.


pkgs.fetchFromSteam {
  name = "..."; # optional
  appId = "...";
  depot = {
    depotId = "...";
    manifestId = "...";
    beta = "..."; # optional

  additionalDepots = [
    # same format as the main `depot`
    # use this to include eg the steamworks redistributable depot

  hash = pkgs.lib.fakeHash;


creates a shell script that launches nginx in the foreground as the current user. the nginx is configured to run an http server on localhost:8080 with the given siteConfig


pkgs.mkNginxServer {
  siteConfig = ''
    location / {
      root path/to/development_site_root;
      error_page 404 /404.html;


for development package nix files, computes the source set of files tracked by git at the given root path


  • root: the root of the git repo, where .git is located
  • subdir, optional: a subdirectory within the git repo. if provided, only files in this subdirectory will go into the final source set


stdenv.mkDerivation {
  # ...
  src = gitSource { root = ./.; };


structure of this repo

  • default.nix: the top level NixOS module, which can also be interpreted as a plain nix file outside of NixOS for access to just the nixpkgs overlay. this contains all definitions for packages, library functions, and NixOS modules
  • lib/: library functions (ie functions that get added to the overlay) go here
  • modules/: NixOS modules go here
  • pkgs/: packages that get added to the overlay go here
  • support/: WIP support tools (eg generating documentation)


this repository is NOT licensed under a "standard" FOSS license. instead, it uses CC-BY-NC-SA 4.0. this means, in particular that commercial use is forbidden. if you are, for whatever reason, interested in using this code commercially, please contact me