mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
19 lines
484 B
Nix
19 lines
484 B
Nix
{ lib, config, confLib, ... }:
|
|
let
|
|
inherit (confLib.gen { name = "emacs"; port = 9812; }) servicePort serviceName;
|
|
in
|
|
{
|
|
options.swarselmodules.server.${serviceName} = lib.mkEnableOption "enable ${serviceName} server on server";
|
|
config = lib.mkIf config.swarselmodules.server.${serviceName} {
|
|
|
|
networking.firewall.allowedTCPPorts = [ servicePort ];
|
|
|
|
services.${serviceName} = {
|
|
enable = true;
|
|
install = true;
|
|
startWithGraphical = false;
|
|
};
|
|
|
|
};
|
|
|
|
}
|