imako: upstreamed

This commit is contained in:
Sridhar Ratnakumar 2025-11-22 18:27:44 -05:00
parent 986edde096
commit 33935ea0b2
2 changed files with 9 additions and 31 deletions

6
flake.lock generated
View file

@ -920,11 +920,11 @@
"unionmount": "unionmount_2" "unionmount": "unionmount_2"
}, },
"locked": { "locked": {
"lastModified": 1763847299, "lastModified": 1763853993,
"narHash": "sha256-Z55hS/vOh+8KzjuG2B1Z5d1GeRUHiLVG79lhPKfP5ig=", "narHash": "sha256-L2h/5ZqkF2VpSI2bgKmWogyITvkHAISALC18un2PiXQ=",
"owner": "srid", "owner": "srid",
"repo": "imako", "repo": "imako",
"rev": "6ebe0640a46ea810da7bce199eadc746328dd239", "rev": "2efd5dc04289ccd5d020bc626769e87835b1a2c2",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,13 +1,13 @@
{ flake, pkgs, lib, config, ... }: { flake, pkgs, config, ... }:
let let
inherit (flake) inputs; inherit (flake) inputs;
imakoPackage = inputs.imako.packages.${pkgs.system}.default;
myVault = "${config.home.homeDirectory}/Dropbox/Vault"; myVault = "${config.home.homeDirectory}/Dropbox/Vault";
in in
{ {
imports = [ imports = [
inputs.emanote.homeManagerModule inputs.emanote.homeManagerModule
inputs.imako.homeManagerModules.imako
]; ];
services.emanote = { services.emanote = {
@ -17,32 +17,10 @@ in
package = inputs.emanote.packages.${pkgs.system}.default; package = inputs.emanote.packages.${pkgs.system}.default;
}; };
# TODO: Upstream as module services.imako = {
# 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 {
enable = true; enable = true;
config = { package = inputs.imako.packages.${pkgs.system}.default;
ProgramArguments = [ "${imakoPackage}/bin/imako" myVault ]; vaultDir = myVault;
RunAtLoad = true; port = 4009;
KeepAlive = false;
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/imako.log";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/imako.err";
};
}; };
} }