From ddf6e9d16a4e814afd84ab5c0fbe910d04f06c78 Mon Sep 17 00:00:00 2001 From: Nathan Braswell Date: Fri, 19 Jun 2026 12:09:44 -0400 Subject: [PATCH] tachikoma flake/service config --- flake.lock | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++- flake.nix | 35 ++++++++++++++++++++++++++++++++- 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index 46a3f64..c7495cf 100644 --- a/flake.lock +++ b/flake.lock @@ -164,6 +164,24 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -376,7 +394,8 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nur": "nur", - "stylix": "stylix" + "stylix": "stylix", + "tachikoma": "tachikoma" } }, "rust-overlay": { @@ -448,6 +467,42 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tachikoma": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1781884897, + "narHash": "sha256-2J3z0t6X5dd6mjBDeYxiSRB1JB0nQX+ftiJtcM5SfDI=", + "ref": "refs/heads/main", + "rev": "3a5c68b63e91cdbabce2180ddecacf8f9f566538", + "revCount": 189, + "type": "git", + "url": "https://forge.room409.xyz/miloignis/tachikoma.git" + }, + "original": { + "type": "git", + "url": "https://forge.room409.xyz/miloignis/tachikoma.git" + } + }, "tinted-kitty": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 40df667..abf29d4 100644 --- a/flake.nix +++ b/flake.nix @@ -24,10 +24,14 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + tachikoma = { + url = "git+https://forge.room409.xyz/miloignis/tachikoma.git"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; }; - outputs = { self, nixpkgs, nur, stylix, awww, niri, home-manager, nixos-hardware }@attrs: + outputs = { self, nixpkgs, nur, stylix, awww, niri, home-manager, tachikoma, nixos-hardware }@attrs: let system = "x86_64-linux"; make_besley = pkgs:(lib: (pkgs.stdenvNoCC.mkDerivation rec { @@ -290,6 +294,7 @@ nur.modules.nixos.default stylix.nixosModules.stylix niri.nixosModules.niri + tachikoma.nixosModules.default home-manager.nixosModules.home-manager homeManagerSharedModule ({ config, lib, pkgs, modulesPath, ... }@innerArgs: (lib.recursiveUpdate (commonConfigFunc innerArgs [ pkgs.gpodder pkgs.evince ]) { @@ -318,6 +323,34 @@ programs.fuse.userAllowOther = true; services.jellyfin.enable = true; + services.tachikoma = { + enable = true; + user = "nathan"; + config = '' + database_prefix = "/home/nathan/tachikoma_db" + adam_smasher_your_io_bandwidth = true # multi-threaded, mmap hashing for new movies on startup + reset_interval = 60 + id = "batou" + port = 8080 + + [shares.default] + serve = [ "/movies", "/nas_disk1", "/nas_disk2/tachi", "/nas_disk3/tachi" ] + download_dir = "/nas_disk1/cache" + mount_point = "/fuse_mount" # this is optional, remove if you don't want to FUSE + max_delete = 30 + + #[shares.podcasts] + #serve = [ "/home/nathan/podcasts" ] + + #[shares.audiobooks] + #serve = [ "/home/nathan/audiobooks" ] + [shares.a_darker_shade_of_grey] + serve = [ "/home/nathan/a_darker_shade_of_grey" ] + max_delete = 5 + #[shares.chat] + #serve = [ ] + ''; + }; # THIS SEEMS CONTRADICTORY # The global useDHCP flag is deprecated, therefore explicitly set to false here.