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"
},
"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": {

View file

@ -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;
};
}