e-imzo: initialize module

e-imzo: (fix, to be squashed) formatted accordingly using `nixfmt`
e-imzo: (fix, to be squashed) removed lib from options by @ FliegendeWurst
e-imzo: (fix, to be squashed) use lib.getExe as mainProgram is defined by @FliegendeWurst
e-imzo: (fix, to be squashed) formatted with `nixfmt-rfc-style` suggestion by @FliegendeWurst
Co-Authored-By: Arne Keller <arne.keller@posteo.de>
This commit is contained in:
Sokhibjon Orzikulov 2025-03-28 02:44:28 +05:00
parent 9f208a0d5e
commit 20396156cb
No known key found for this signature in database
GPG key ID: 3C35D3AF0DA1D6A8
2 changed files with 51 additions and 0 deletions

View file

@ -1394,6 +1394,7 @@
./services/security/certmgr.nix
./services/security/cfssl.nix
./services/security/clamav.nix
./services/security/e-imzo.nix
./services/security/endlessh-go.nix
./services/security/endlessh.nix
./services/security/esdm.nix

View file

@ -0,0 +1,50 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.e-imzo;
in
{
options = {
services.e-imzo = {
enable = lib.mkEnableOption "E-IMZO";
package = lib.mkPackageOption pkgs "e-imzo" {
extraDescription = "Official mirror deletes old versions as soon as they release new one. Feel free to use either unstable or your own custom e-imzo package and ping maintainer.";
};
};
};
config = lib.mkIf cfg.enable {
systemd.user.services.e-imzo = {
enable = true;
description = "E-IMZO, uzbek state web signing service";
documentation = [ "https://github.com/xinux-org/e-imzo" ];
after = [
"network-online.target"
"graphical.target"
];
wants = [
"network-online.target"
"graphical.target"
];
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "simple";
Restart = "always";
RestartSec = 1;
ExecStart = lib.getExe cfg.package;
NoNewPrivileges = true;
SystemCallArchitectures = "native";
};
};
};
meta.maintainers = with lib.maintainers; [ orzklv ];
}