seeks: nixos module
This commit is contained in:
parent
76a7b0ba68
commit
561d3b3860
@ -155,6 +155,7 @@
|
|||||||
consul = 145;
|
consul = 145;
|
||||||
mailpile = 146;
|
mailpile = 146;
|
||||||
redmine = 147;
|
redmine = 147;
|
||||||
|
seeks = 148;
|
||||||
|
|
||||||
prosody = 148;
|
prosody = 148;
|
||||||
|
|
||||||
@ -279,6 +280,7 @@
|
|||||||
uhub = 142;
|
uhub = 142;
|
||||||
mailpile = 146;
|
mailpile = 146;
|
||||||
redmine = 147;
|
redmine = 147;
|
||||||
|
seeks = 148;
|
||||||
|
|
||||||
prosody = 148;
|
prosody = 148;
|
||||||
|
|
||||||
|
@ -259,6 +259,7 @@
|
|||||||
./services/networking/rpcbind.nix
|
./services/networking/rpcbind.nix
|
||||||
./services/networking/sabnzbd.nix
|
./services/networking/sabnzbd.nix
|
||||||
./services/networking/searx.nix
|
./services/networking/searx.nix
|
||||||
|
./services/networking/seeks.nix
|
||||||
./services/networking/spiped.nix
|
./services/networking/spiped.nix
|
||||||
./services/networking/ssh/lshd.nix
|
./services/networking/ssh/lshd.nix
|
||||||
./services/networking/ssh/sshd.nix
|
./services/networking/ssh/sshd.nix
|
||||||
|
75
nixos/modules/services/networking/seeks.nix
Normal file
75
nixos/modules/services/networking/seeks.nix
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.services.seeks;
|
||||||
|
|
||||||
|
confDir = cfg.confDir;
|
||||||
|
|
||||||
|
seeks = pkgs.seeks.override { seeks_confDir = confDir; };
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
services.seeks = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
description = "
|
||||||
|
Whether to enable the Seeks server.
|
||||||
|
";
|
||||||
|
};
|
||||||
|
|
||||||
|
confDir = mkOption {
|
||||||
|
default = "";
|
||||||
|
type = types.str;
|
||||||
|
description = "
|
||||||
|
The Seeks server configuration. If it is not specified,
|
||||||
|
a default configuration is used (${seeks}/etc/seeks).
|
||||||
|
";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = mkIf config.services.seeks.enable {
|
||||||
|
|
||||||
|
users.extraUsers.seeks =
|
||||||
|
{ uid = config.ids.uids.seeks;
|
||||||
|
description = "Seeks user";
|
||||||
|
createHome = true;
|
||||||
|
home = "/var/lib/seeks";
|
||||||
|
};
|
||||||
|
|
||||||
|
users.extraGroups.seeks =
|
||||||
|
{ gid = config.ids.gids.seeks;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.seeks =
|
||||||
|
{
|
||||||
|
description = "Seeks server, the p2p search engine.";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
User = "seeks";
|
||||||
|
ExecStart = "${seeks}/bin/seeks";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [ seeks ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user