From 33935ea0b26de4b8bc5276cfb756b8eb8379d4e8 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 22 Nov 2025 18:27:44 -0500 Subject: [PATCH] imako: upstreamed --- flake.lock | 6 +++--- modules/home/services/obsidian.nix | 34 ++++++------------------------ 2 files changed, 9 insertions(+), 31 deletions(-) diff --git a/flake.lock b/flake.lock index aa207b3..7471b53 100644 --- a/flake.lock +++ b/flake.lock @@ -920,11 +920,11 @@ "unionmount": "unionmount_2" }, "locked": { - "lastModified": 1763847299, - "narHash": "sha256-Z55hS/vOh+8KzjuG2B1Z5d1GeRUHiLVG79lhPKfP5ig=", + "lastModified": 1763853993, + "narHash": "sha256-L2h/5ZqkF2VpSI2bgKmWogyITvkHAISALC18un2PiXQ=", "owner": "srid", "repo": "imako", - "rev": "6ebe0640a46ea810da7bce199eadc746328dd239", + "rev": "2efd5dc04289ccd5d020bc626769e87835b1a2c2", "type": "github" }, "original": { diff --git a/modules/home/services/obsidian.nix b/modules/home/services/obsidian.nix index cb3995c..e3f19c6 100644 --- a/modules/home/services/obsidian.nix +++ b/modules/home/services/obsidian.nix @@ -1,13 +1,13 @@ -{ flake, pkgs, lib, config, ... }: +{ flake, pkgs, config, ... }: let inherit (flake) inputs; - imakoPackage = inputs.imako.packages.${pkgs.system}.default; myVault = "${config.home.homeDirectory}/Dropbox/Vault"; in { imports = [ inputs.emanote.homeManagerModule + inputs.imako.homeManagerModules.imako ]; services.emanote = { @@ -17,32 +17,10 @@ in package = inputs.emanote.packages.${pkgs.system}.default; }; - # TODO: Upstream as module - # port = 4009 (hardcoded) - systemd.user.services.imako = { - Unit = { - Description = "Imako for Obsidian"; - After = [ "network.target" ]; - }; - - Service = { - Type = "simple"; - ExecStart = "${imakoPackage}/bin/imako ${myVault}"; - }; - - Install = { - WantedBy = [ "default.target" ]; - }; - }; - - launchd.agents.imako = lib.mkIf pkgs.stdenv.isDarwin { + services.imako = { enable = true; - config = { - ProgramArguments = [ "${imakoPackage}/bin/imako" myVault ]; - RunAtLoad = true; - KeepAlive = false; - StandardOutPath = "${config.home.homeDirectory}/Library/Logs/imako.log"; - StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/imako.err"; - }; + package = inputs.imako.packages.${pkgs.system}.default; + vaultDir = myVault; + port = 4009; }; }