nixos-config/features/ema/emanote.nix
2021-09-30 11:19:27 -04:00

20 lines
541 B
Nix

{ pkgs, inputs, system, ... }:
let
emanote = inputs.emanote.outputs.defaultPackage.${system};
in
{
# Global service, rather than user service, as the latter doesn't work in NixOS-WSL
systemd.services.emanote = {
description = "Emanote ~/Documents/Notes";
after = [ "network.target" ];
wantedBy = [ "default.target" ];
environment = {
PORT = "7000";
};
serviceConfig = {
User = "srid";
Restart = "always";
ExecStart = "${emanote}/bin/emanote -L /home/srid/Documents/Notes";
};
};
}