Skip to content
zarthrossPublic

About

Just some nix flakes.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

396 Commits

Folders and files

Repository files navigation

Flakey

CI Renovate

Provides

nix flake show --all-systems

├───actions-nix: unknown
├───checks
│   ├───aarch64-darwin
│   │   ├───check-flake-file: derivation 'check-flake-file'
│   │   ├───package-bitwarden: derivation 'Bitwarden-2026.8.0'
│   │   ├───package-drift-detector: derivation 'drift-detector-v0.0.7'
│   │   ├───package-eca-bin: derivation 'eca-bin-0.158.1'
│   │   ├───package-hot: derivation 'Hot-1.9.4'
│   │   ├───package-keepingYouAwake: derivation 'KeepingYouAwake-1.6.8'
│   │   ├───package-rectangle: derivation 'Rectangle-1.100'
│   │   ├───package-render-workflows: derivation 'render-workflows'
│   │   ├───package-write-flake: derivation 'write-flake'
│   │   ├───package-write-inputs: derivation 'write-inputs'
│   │   ├───package-write-lock: derivation 'write-lock'
│   │   ├───pre-commit: derivation 'pre-commit-run'
│   │   └───treefmt: derivation 'treefmt-check'
│   ├───aarch64-linux
│   │   ├───check-flake-file: derivation 'check-flake-file'
│   │   ├───package-drift-detector: derivation 'drift-detector-v0.0.7'
│   │   ├───package-eca-bin: derivation 'eca-bin-0.158.1'
│   │   ├───package-render-workflows: derivation 'render-workflows'
│   │   ├───package-write-flake: derivation 'write-flake'
│   │   ├───package-write-inputs: derivation 'write-inputs'
│   │   ├───package-write-lock: derivation 'write-lock'
│   │   ├───pre-commit: derivation 'pre-commit-run'
│   │   └───treefmt: derivation 'treefmt-check'
│   ├───x86_64-darwin
│   │   ├───check-flake-file: derivation 'check-flake-file'
│   │   ├───package-bitwarden: derivation 'Bitwarden-2026.8.0'
│   │   ├───package-drift-detector: derivation 'drift-detector-v0.0.7'
│   │   ├───package-eca-bin: derivation 'eca-bin-0.158.1'
│   │   ├───package-hot: derivation 'Hot-1.9.4'
│   │   ├───package-keepingYouAwake: derivation 'KeepingYouAwake-1.6.8'
│   │   ├───package-rectangle: derivation 'Rectangle-1.100'
│   │   ├───package-render-workflows: derivation 'render-workflows'
│   │   ├───package-write-flake: derivation 'write-flake'
│   │   ├───package-write-inputs: derivation 'write-inputs'
│   │   ├───package-write-lock: derivation 'write-lock'
│   │   ├───pre-commit: derivation 'pre-commit-run'
│   │   └───treefmt: derivation 'treefmt-check'
│   └───x86_64-linux
│       ├───check-flake-file: derivation 'check-flake-file'
│       ├───package-drift-detector: derivation 'drift-detector-v0.0.7'
│       ├───package-eca-bin: derivation 'eca-bin-0.158.1'
│       ├───package-render-workflows: derivation 'render-workflows'
│       ├───package-write-flake: derivation 'write-flake'
│       ├───package-write-inputs: derivation 'write-inputs'
│       ├───package-write-lock: derivation 'write-lock'
│       ├───pre-commit: derivation 'pre-commit-run'
│       └───treefmt: derivation 'treefmt-check'
├───darwinModules: unknown
├───devShells
│   ├───aarch64-darwin
│   │   └───default: development environment 'devshell'
│   ├───aarch64-linux
│   │   └───default: development environment 'devshell'
│   ├───x86_64-darwin
│   │   └───default: development environment 'devshell'
│   └───x86_64-linux
│       └───default: development environment 'devshell'
├───formatter
│   ├───aarch64-darwin: package 'treefmt'
│   ├───aarch64-linux: package 'treefmt'
│   ├───x86_64-darwin: package 'treefmt'
│   └───x86_64-linux: package 'treefmt'
├───homeModules: unknown
├───modules: unknown
├───nixosModules
│   ├───allow-unfree-predicates: NixOS module
│   ├───default: NixOS module
│   ├───nix-change-report: NixOS module
│   └───nixos-change-report: NixOS module
├───overlays
│   └───default: Nixpkgs overlay
└───packages
    ├───aarch64-darwin
    │   ├───bitwarden: package 'Bitwarden-2026.8.0'
    │   ├───drift-detector: package 'drift-detector-v0.0.7'
    │   ├───eca-bin: package 'eca-bin-0.158.1'
    │   ├───hot: package 'Hot-1.9.4'
    │   ├───keepingYouAwake: package 'KeepingYouAwake-1.6.8'
    │   ├───rectangle: package 'Rectangle-1.100'
    │   ├───render-workflows: package 'render-workflows'
    │   ├───write-flake: package 'write-flake'
    │   ├───write-inputs: package 'write-inputs'
    │   └───write-lock: package 'write-lock'
    ├───aarch64-linux
    │   ├───drift-detector: package 'drift-detector-v0.0.7'
    │   ├───eca-bin: package 'eca-bin-0.158.1'
    │   ├───render-workflows: package 'render-workflows'
    │   ├───write-flake: package 'write-flake'
    │   ├───write-inputs: package 'write-inputs'
    │   └───write-lock: package 'write-lock'
    ├───x86_64-darwin
    │   ├───bitwarden: package 'Bitwarden-2026.8.0'
    │   ├───drift-detector: package 'drift-detector-v0.0.7'
    │   ├───eca-bin: package 'eca-bin-0.158.1'
    │   ├───hot: package 'Hot-1.9.4'
    │   ├───keepingYouAwake: package 'KeepingYouAwake-1.6.8'
    │   ├───rectangle: package 'Rectangle-1.100'
    │   ├───render-workflows: package 'render-workflows'
    │   ├───write-flake: package 'write-flake'
    │   ├───write-inputs: package 'write-inputs'
    │   └───write-lock: package 'write-lock'
    └───x86_64-linux
        ├───drift-detector: package 'drift-detector-v0.0.7'
        ├───eca-bin: package 'eca-bin-0.158.1'
        ├───render-workflows: package 'render-workflows'
        ├───write-flake: package 'write-flake'
        ├───write-inputs: package 'write-inputs'
        └───write-lock: package 'write-lock'

homeModules, darwinModules, and modules show as unknown because they're plain attrsets of module functions rather than a type nix flake show recognizes — see the sections below for what's actually in them.

Option Namespacing

Every custom option this flake defines for home-manager (or nix-darwin/NixOS) lives under a flakey. prefix (e.g. flakey.programs.eca), never a bare programs.*/services.*/system.* path. Those top-level namespaces belong to real home-manager/nix-darwin/NixOS, and declaring an option directly under one risks a hard conflict if upstream later ships an option with the exact same name — see Removed: omniwm below for a case where that actually happened.

A couple of modules predate this convention and used a bare programs.* path (ghorg, drift-detector) or a different custom prefix (dgibs.programs.eca). Those old paths still work today via lib.mkRenamedOptionModuleWith deprecation aliases (you'll get a warning pointing at the new flakey.* path), but new configs should use the flakey.* form directly.

Enable Options

Every module that wires up config unconditionally the moment it's imported also declares a flakey.<module-name>.enable option, defaulting to true (matching today's always-on behavior). This matters in particular for modules bundled into nixosModules.default/darwinModules.default/ homeModules.default (see modules/default-modules.nix) — without an enable option there'd be no way to opt out of a piece of default short of not using default at all. Set the option to false to opt out:

flakey.nix-change-report.enable = false;
flakey.allow-unfree-predicates.enable = false;

nixosModules

allow-unfree-predicates

With this modules, instead of:

nixpkgs.config.allowUnfree = true;  # EVERYTHING IS ALLOWED;

or

# You CANNOT set this in multiple places since its a function...
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
    "roon-server"
    "vscode"
  ];

now you can write:

# Its just a list of package regexes you want to allow.
# you can set this in multiple modules and it just adds more regexes!!!
nixpkgs.allowUnfreeRegexes = ["slack" "discord"];

Enabled by default via flakey.allow-unfree-predicates.enable. Since nixpkgs.config.allowUnfreePredicate is a single function slot, set this to false if you (or another module) set allowUnfreePredicate yourself, to avoid the two silently clobbering each other.

nix-change-report

Automatically adds a change report using nvd to each nixos activation. Enabled by default via flakey.nix-change-report.enable; set to false to disable.

homeModules

allow-unfree-predicates

See

nix-change-report

Automatically adds a change report using nvd to each home-manager activation. Enabled by default via flakey.nix-change-report.enable; set to false to disable.

❯ home-manager switch
Starting Home Manager activation
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating createGpgHomedir
Activating nix-change-report
<<< /home/my-home/.local/state/nix/profiles/home-manager
>>> /nix/store/w4vgy6jalyh1vc1ghgas13hpxb7qsgz0-home-manager-generation
Removed packages:
[R.]  #1  ponysay-unstable  2021-03-27
Closure size: 1392 -> 1391 (4 paths added, 5 paths removed, delta -1, disk usage -10.8MiB).
Activating installPackages
replacing old 'home-manager-path'
installing 'home-manager-path'
Activating migrateGhAccounts
Activating linkGeneration
Cleaning up orphan links from /home/my-home
Creating profile generation 567
Creating home file links in /home/my-home
Activating onFilesChange
Activating reloadSystemd

ghorg

Structured home-manager config for ghorg (bulk-clones GitHub/GitLab/Bitbucket/Gitea/sourcehut orgs and users). Options live under flakey.programs.ghorg (see Option Namespacing):

flakey.programs.ghorg = {
  enable = true;
  reclone = {
    nix-community = {
      target = "nix-community";
      description = "Clone all nix-community repos";
    };
  };
};

Generates ghorg/conf.yaml and ghorg/reclone.yaml under $XDG_CONFIG_HOME.

eca

Manages ECA (Editor Code Assistant) configuration. Options live under flakey.programs.eca (see Option Namespacing). Supports providers, agents, MCP servers, tool-call approval rules, and inline or path-based rules/skills; writes ~/.config/eca/config.json.

flakey.programs.eca = {
  enable = true;
  settings = {
    defaultModel = "openai/gpt-5.2";
    providers.openai = {
      api = "openai-responses";
      key = "\${env:OPENAI_API_KEY}";
    };
  };
};

drift-detector

Manages Drift Detector config.yaml. Options live under flakey.programs.drift-detector (see Option Namespacing).

flakey.programs.drift-detector = {
  enable = true;
  settings.github.organization = "myorg";
};

Removed: omniwm

flakey used to ship its own programs.omniwm home-manager module for OmniWM. Upstream home-manager has since added its own programs.omniwm module at the exact same option path, so flakey's copy was removed entirely rather than kept alongside it — two independent modules declaring the same option path cannot safely coexist (nixpkgs would reject the duplicate declaration), and there was no way to "deprecate" the old module without keeping something declared at that path. If you were using flakey's omniwm module, switch to home-manager's own programs.omniwm instead.

darwinModules

nix-change-report

Automatically adds a change report using nvd to each darwin-nix activation. Enabled by default via flakey.nix-change-report.enable; set to false to disable.

Darwin packages

A few OSX Apps that I use that aren't in nixpkgs, so I've add them to this repo.

Renovate proposes tag bumps (see .github/renovate.jsonc); each package's update-hash.sh then refreshes url/hash for that tag.

Package Management

Packages use the sources.json pattern:

  • Each sources.json holds owner, repo, tag, an asset pattern, and the resulting version, url, hash
  • NAME.pkg.nix uses lib.importJSON ./sources.json
  • Multi-platform packages (eca, drift-detector) key asset info by system
  • update-hash.sh fetches only the release for the tag already on disk - never "latest" - so Renovate controls when a new tag is picked up

Adding a New Package

  1. Create modules/NAME/NAME.pkg.nix (plain callPackage derivation, excluded from import-tree auto-import):

    { pkgs, stdenv, lib }:
    let sources = lib.importJSON ./sources.json;
    in stdenv.mkDerivation {
      inherit (sources) version;
      pname = "NAME";
      src = pkgs.fetchurl { inherit (sources) url sha256; };
      # ... build instructions
    }
  2. Create modules/NAME/NAME.nix registering the package into flake.modules.<class>.<name> (see modules/bitwarden/bitwarden.nix for a minimal example).

  3. Write modules/NAME/sources.json by hand with owner, repo, tag, an asset pattern, and placeholder version/url/hash.

  4. Create modules/NAME/update-hash.sh (see modules/hot/update-hash.sh for a minimal example, or modules/bitwarden for a sidecar-hash example), then run it to fill in version/url/hash.

    No .github/renovate.jsonc changes needed - its JSONata customManager picks up any modules/*/sources.json with owner/repo/tag fields.

Updating Packages

Renovate bumps tag and runs that package's update-hash.sh as a postUpgradeTasks step, landing url/hash/version in the same PR.

To refresh manually: nix develop -c ./modules/NAME/update-hash.sh.

Bitwarden

Darwin package for Bitwarden

keepingYouAwake

Keeping You Awake Prevents your Mac from going to sleep

Rectangle

Rectangle: Move and resize windows in macOS using keyboard shortcuts or snap areas.

Hot

Hot is macOS menu bar application that displays the CPU speed limit due to thermal issues.

Drift Detector

Drift Detector is a Swift CLI that inspects Kubernetes deployments and compares them against the latest GitHub release tags to identify version drift. Available for x86_64-linux and aarch64-darwin (only platforms published upstream).

FAQ

Collect Garbage chmod ... operation not permitted

Problem:

When running nix-collect-garbage --delete-older-than 16

You get something like error: chmod '/nix/store/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-some-app-1.2.3/Applications/SomeApp.app': Operation not permitted

Solution:

Grant nix full disk access.

  1. Goto Apple -> System Settings -> Privacy & Security -> Ful Disk Access
  2. Find nix
    • if you find multiple nix try removing all by highlighting them and clicking the - at the bottom, and try collecting garbage again. You'll then see only a single nix entry show up.
  3. Check the box for nix

About

Just some nix flakes.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages