-
-
Save anonymous/dadb79ed421bd65a02905013e1165013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, ...}: | |
let | |
cfg = config.services.hiawatha; | |
in | |
with lib; | |
{ | |
options.services.hiawatha = { | |
enable = mkOption { | |
default = false; | |
description = "Enable the Hiawatha server"; | |
}; | |
configFile = { | |
default = "${pkgs.hiawatha}/etc/hiawatha" ; | |
type = types.path; | |
}; | |
}; | |
config = mkIf cfg.enable { | |
systemd.services.hiawatha = { | |
description = "Hiawatha"; | |
wantedBy = [ "multi-user.target" ]; | |
serviceConfig = { | |
ExecStart = "${pkgs.hiawatha}/bin/hiawatha -c cfg.configFile"; | |
Type = "forking"; | |
DynamicUsers = true; | |
}; | |
environment.systemPackages = [ pkgs.hiawatha ]; | |
/* | |
users.extraUsers.hiawatha = { | |
group = "hiawatha"; | |
uid = config.ids.uids.hiawatha;}; | |
users.extraGroups.hiawatha.gid = config.ids.uids.hiawatha; */ | |
}; | |
}; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment