1 { config, lib, pkgs, ... }:
3 cfg = config.services.i2p;
4 homeDir = "/var/lib/i2p";
8 options.services.i2p.enable = lib.mkEnableOption "I2P router";
11 config = lib.mkIf cfg.enable {
14 description = "i2p User";
17 uid = config.ids.uids.i2p;
19 users.groups.i2p.gid = config.ids.gids.i2p;
20 systemd.services.i2p = {
21 description = "I2P router with administration interface for hidden services";
22 after = [ "network.target" ];
23 wantedBy = [ "multi-user.target" ];
26 WorkingDirectory = homeDir;
28 ExecStart = "${pkgs.i2p}/bin/i2prouter";