nix

configuration files that power my machines
Log | Files | Refs | README | LICENSE

commit 7729d62e3adb6a9486eab877bf8bb556bac736c0
parent 18a290a9f075a415cf3dcd7a2c930838fe1d8db1
Author: mtmn <miro@haravara.org>
Date:   Sat, 11 Apr 2026 13:57:28 +0200

feat: add ccache, cleanup, void pkgs

Diffstat:
Mflake.nix | 5++---
Mhome.nix | 4++--
Mhosts/nixaran/configuration.nix | 0
Mhosts/void/default.nix | 135++++++++++++++++++++++---------------------------------------------------------
Amodules/ccache.nix | 31+++++++++++++++++++++++++++++++
Mmodules/mixins/dotfiles/home/gitignore | 3++-
Mmodules/services/caddy.nix | 16+++++++++++++++-
Dmodules/services/mtmn.nix | 22----------------------
Mmodules/services/storage-box.nix | 15---------------
9 files changed, 89 insertions(+), 142 deletions(-)

diff --git a/flake.nix b/flake.nix @@ -37,8 +37,8 @@ outputs = { self, - nixpkgs, home-manager, + nixpkgs, deploy-rs, disko, ... @@ -146,11 +146,11 @@ inherit nixosConfigurations homeConfigurations configData; nixosModules = { + ccache = import ./modules/ccache.nix; base = import ./modules/nixos/base.nix; cinny = import ./modules/services/cinny.nix; monitoring = import ./modules/services/monitoring.nix; caddy = import ./modules/services/caddy.nix; - mtmn = import ./modules/services/mtmn.nix; forgejo = import ./modules/services/forgejo.nix; matrix = import ./modules/services/matrix.nix; dex = import ./modules/services/dex.nix; @@ -165,7 +165,6 @@ bandeno = import ./modules/services/bandeno.nix; headscale = import ./modules/services/headscale.nix; searxng = import ./modules/services/searxng.nix; - harmonia = import ./modules/services/harmonia.nix; attic = import ./modules/services/attic.nix; static = import ./modules/services/static.nix; miniflux = import ./modules/services/miniflux.nix; diff --git a/home.nix b/home.nix @@ -31,8 +31,8 @@ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "claude-code" - "crush" + "claude-code-bin" + "libvgm" ]; nix = { diff --git a/hosts/nixaran/configuration.nix b/hosts/nixaran/configuration.nix Binary files differ. diff --git a/hosts/void/default.nix b/hosts/void/default.nix @@ -3,120 +3,98 @@ parts = { utils = with pkgs; [ - ruff shellcheck shfmt - sops - zls + gron bear ctags - biome entr hyperfine gdb strace perf - valgrind - aflplusplus meson ninja cmake moor - watchman buf - clang-tools harper - rage - ragenix - bmake - dhall - dhall-lsp-server + ccache ]; - media = with pkgs; [ - mpc - listenbrainz-mpd - ncmpcpp - mympd - sacad - ffmpeg - yt-dlp - python314Packages.yt-dlp-ejs - imagemagick - ]; + media = + (with pkgs; [ + ncmpcpp + mympd + sacad + ffmpeg + yt-dlp + imagemagick + exiftool + ]) + ++ (with pkgs.python314Packages; [ + yt-dlp-ejs + ]); ops = with pkgs; [ - ansible ansible-lint + ansible awscli2 - hadolint - woodpecker-cli - ansible-language-server dnscontrol - act - caddy + woodpecker-cli + podman + skopeo ]; - gui = with pkgs; [ - feather - picard + lsp = with pkgs; [ + typescript-language-server + ansible-language-server + clang-tools + gopls + nixd + zls ]; data = with pkgs; [ duckdb - gron - jaq jless + jaq jq - pandoc - slop - taplo datasette hledger hledger-iadd ]; vcs = with pkgs; [ - bfg-repo-cleaner difftastic git-bug git-crypt git-absorb git-annex - git-filter-repo gitleaks jujutsu jjui prek - tig - got ]; nix = with pkgs; [ alejandra comma deadnix - deploy-rs nh - nil nix-du - nixd - nixfmt nixos-anywhere nvd ragenix statix nix-diff attic-client - deploy-rs nix-output-monitor ]; net = with pkgs; [ bore-cli - chisel curl - hurl inetutils lftp mosh @@ -130,82 +108,43 @@ trickle websocat wget - whois xh ]; web = with pkgs; [ + aerc offpunk monolith newsraft - w3m vdirsyncer ]; - beam28 = - (with pkgs.beam28Packages; [ - erlang - rebar3 - expert - elixir_1_20 - ]) - ++ (with pkgs; [ - gleam - ]); - llm = with pkgs; [ - crush qwen-code - claude-code - claude-monitor gemini-cli-bin + claude-code-bin ]; lua = (with pkgs.luaPackages; [ - luarocks fennel lua ]) ++ (with pkgs; [ fnlfmt - fennel-ls ]); - clj = with pkgs; [ - babashka - clojure - clojure-lsp - clj-kondo - leiningen - cljfmt - ]; - - go = with pkgs; [ - go - gopls - golangci-lint - ]; - - ocaml = with pkgs; [ - ocaml - dune - ]; - - rust = with pkgs; [ - rustup - cargo-outdated - ]; - javascript = with pkgs; [ nodejs - bun - deno purescript - typescript-language-server - elmPackages.elm - eslint - esbuild + ]; + + rest = with pkgs; [ + babashka + feather + picard + rustup + gleam ]; }; in { diff --git a/modules/ccache.nix b/modules/ccache.nix @@ -0,0 +1,31 @@ +{...}: { + nixpkgs.overlays = [ + (_self: super: { + ffmpeg = super.ffmpeg.override {stdenv = super.ccacheStdenv;}; + deploy-rs = super.deploy-rs.override {stdenv = super.ccacheStdenv;}; + ccacheWrapper = super.ccacheWrapper.override { + extraConfig = '' + export CCACHE_COMPRESS=1 + export CCACHE_DIR="/nix/var/cache/ccache" + export CCACHE_UMASK=007 + if [ ! -d "$CCACHE_DIR" ]; then + echo "=====" + echo "Directory '$CCACHE_DIR' does not exist" + echo "Please create it with:" + echo " sudo mkdir -m0770 '$CCACHE_DIR'" + echo " sudo chown root:nixbld '$CCACHE_DIR'" + echo "=====" + exit 1 + fi + if [ ! -w "$CCACHE_DIR" ]; then + echo "=====" + echo "Directory '$CCACHE_DIR' is not accessible for user $(whoami)" + echo "Please verify its access permissions" + echo "=====" + exit 1 + fi + ''; + }; + }) + ]; +} diff --git a/modules/mixins/dotfiles/home/gitignore b/modules/mixins/dotfiles/home/gitignore @@ -1,5 +1,6 @@ +.qwen/ .crush/ +.claude/ .gemini/ -.qwen/ AGENTS.md CLAUDE.md diff --git a/modules/services/caddy.nix b/modules/services/caddy.nix @@ -4,6 +4,8 @@ ... }: let cfg = config.services.haravara.caddy; + mtmnCfg = config.services.haravara.mtmn; + staticFiles = ../../static/mtmn; mkAuthSnippet = name: authDomain: '' (${name}) { @@ -19,6 +21,10 @@ } ''; in { + options.services.haravara.mtmn = { + enable = lib.mkEnableOption "mtmn static site"; + }; + options.services.haravara.caddy = { enable = lib.mkEnableOption "Caddy reverse proxy and static site server"; email = lib.mkOption { @@ -64,7 +70,15 @@ in { } } ''; - virtualHosts = {}; + virtualHosts = lib.optionalAttrs mtmnCfg.enable { + "mtmn.name".extraConfig = '' + root * ${staticFiles} + file_server + handle /moments-eluding { + redir https://soundcloud.com/haravara/sets/moments-eluding permanent + } + ''; + }; }; networking.firewall.allowedTCPPorts = [80 443]; diff --git a/modules/services/mtmn.nix b/modules/services/mtmn.nix @@ -1,22 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.services.haravara.mtmn; - staticFiles = ../../static/mtmn; -in { - options.services.haravara.mtmn = { - enable = lib.mkEnableOption "mtmn static site"; - }; - - config = lib.mkIf cfg.enable { - services.caddy.virtualHosts."mtmn.name".extraConfig = '' - root * ${staticFiles} - file_server - handle /moments-eluding { - redir https://soundcloud.com/haravara/sets/moments-eluding permanent - } - ''; - }; -} diff --git a/modules/services/storage-box.nix b/modules/services/storage-box.nix @@ -69,9 +69,6 @@ in { ++ lib.optionals config.services.haravara.monitoring.enable [ "d ${cfg.mountPoint}/nixaran/victoriametrics - - - -" ] - ++ lib.optionals config.services.haravara.harmonia.enable [ - "d ${cfg.mountPoint}/nixaran/harmonia 0750 harmonia harmonia -" - ] ++ lib.optionals config.services.haravara.bazel-cache.enable [ "d ${cfg.mountPoint}/nixaran/bazel-cache 0750 bazel-remote bazel-remote -" ] @@ -122,14 +119,6 @@ in { depends = [cfg.mountPoint]; }; } - // lib.optionalAttrs config.services.haravara.harmonia.enable { - "/var/lib/harmonia" = { - device = "${cfg.mountPoint}/nixaran/harmonia"; - fsType = "none"; - options = ["bind" "nofail" "_netdev"]; - depends = ["${cfg.mountPoint}"]; - }; - } // lib.optionalAttrs config.services.haravara.bazel-cache.enable { "/var/lib/bazel-cache" = { device = "${cfg.mountPoint}/nixaran/bazel-cache"; @@ -162,10 +151,6 @@ in { victoriametrics.after = ["var-lib-victoriametrics.mount"]; victoriametrics.requires = ["var-lib-victoriametrics.mount"]; }) - (lib.mkIf config.services.haravara.harmonia.enable { - harmonia.after = ["var-lib-harmonia.mount"]; - harmonia.requires = ["var-lib-harmonia.mount"]; - }) (lib.mkIf config.services.haravara.bazel-cache.enable { bazel-remote.after = ["var-lib-bazel\\x2dcache.mount"]; bazel-remote.requires = ["var-lib-bazel\\x2dcache.mount"];