NixOS is the endgame to Distro Hopping
  • Nix 52.7%
  • TypeScript 36.1%
  • C# 3%
  • Lua 2%
  • SCSS 1.8%
  • Other 4.3%
Find a file
matt1432 7472686c1e
All checks were successful
Discord / discord commits (push) Has been skipped
feat(nvim): setup precognition-nvim
2026-01-25 20:29:55 -05:00
.forgejo/workflows feat(servers): test github action 2024-01-11 17:22:35 -05:00
.github/workflows ci(darwin): create user for hm activation 2026-01-25 15:08:38 -05:00
apps chore: update sources 2026-01-23 18:50:16 -05:00
configurations chore(jellarr): remove commented library config 2026-01-24 23:15:19 -05:00
devShells feat(nvim): don't dynamically load web config, put behind option 2026-01-17 13:17:10 -05:00
homeManagerModules feat(nvim): setup precognition-nvim 2026-01-25 20:29:55 -05:00
inputs feat(nvim): use neovim-nightly overlays 2026-01-25 18:11:43 -05:00
lib chore: update sources 2026-01-23 18:50:16 -05:00
modules feat(nvim): use neovim-nightly overlays 2026-01-25 18:11:43 -05:00
nixFastChecks feat: include darwin in systems and fix some errors 2026-01-13 22:41:52 -05:00
overlays feat(darwin): make base-darwin module and import it 2026-01-17 22:06:25 -05:00
packages chore: update sources 2026-01-20 23:21:23 -05:00
results fix(cache): keep gc roots of nix-fast-build alive 2024-12-11 08:30:13 -05:00
scopedPackages chore: update sources 2026-01-23 18:50:16 -05:00
.gitattributes docs: add explanation in .gitattributes 2025-12-18 11:07:08 -05:00
.gitignore fix(cache): keep gc roots of nix-fast-build alive 2024-12-11 08:30:13 -05:00
_outputs.nix chore: update sources 2026-01-20 23:21:23 -05:00
flake.lock feat(nvim): use neovim-nightly overlays 2026-01-25 18:11:43 -05:00
flake.nix feat(nvim): use neovim-nightly overlays 2026-01-25 18:11:43 -05:00
justfile feat(l2s): add ls command 2025-10-01 02:41:25 -04:00
LICENSE.md chore: add license 2024-01-18 11:01:09 -05:00
README.md docs: clean up and remove TODOs 2025-02-18 02:41:02 -05:00

My NixOS configs

AGS

You might find it weird that most of my config is written in TypeScript. That's because all my desktops run AGS for UI. Click on this to see my configuration.

I'm also a victim of Stockholm syndrome at this point and make my scripts in TypeScript because it's the scripting language I am most comfortable with.

About

General

This repo is the complete configuration of machines I own running NixOS or Nix and any other related smaller projects exposed by a Nix Flake.

Its main directory structure is based on a flake's outputs.

I try to follow a few rules to better organise my Nix code:

  • Every main subdirectory only has an optional default.nix and subfolders for each of its attributes.
  • Inside a subdirectory, if there is non nix code, it will be in a config folder.
  • Every module should not do anything if imported. An enable option should be toggled for it to have any effect.
  • Any nix file that represents a module should be named default.nix (a nix file which is imported directly can be called anything else alongside default.nix)

Flake Location

This git repo will always be located at $FLAKE (config.environment.variables.FLAKE) and symlinked to /etc/nixos to have everything where NixOS tools expect things to be.

ie.

sudo rm -r /etc/nixos

echo "$FLAKE" # /home/matt/.nix

sudo ln -sf /home/matt/.nix /etc/nixos

Subdirectories

Output / Directory Description
apps Misc scripts ran from the flake
configurations device, ISO and nix-on-droid configurations
devShells Development shells for a bunch of projects and languages
homeManagerModules Modules made for home-manager
inputs Pre-evaluated flake inputs
lib Custom Nix functions made easily available
modules Modules made for NixOS systems
nixFastChecks Attribute set of derivations exposed by this flake
overlays Nixpkgs overlays
packages Some custom packages not available in nixpkgs or modified from it
results Directory where I neatly keep my result symlinks from nixFastChecks
scopedPackages Some custom package scopes not available in nixpkgs or modified from it

Secrets

All my secrets are in a private git repo that makes use of sops-nix. I generate .sops.yaml from .sops.nix:

let
  wim = "somekey";
  binto = "somekey2";
in {
  creation_rules = [
    {
      path_regex = "secrets/[^/]+\\.(yaml|json|env|ini)$";
      key_groups = [
        {
          age = [wim binto];
        }
      ];
    }
  ];
}

which is then converted to .sops.yaml using remarshal and this shell command:

nix eval --json --file ./.sops.nix | remarshal --if json --of yaml > .sops.yaml

TLDR: I hate YAML