kerberos-server: cleanup of kerberos.nix
General cleanup before adding more options.
This commit is contained in:
parent
ee3bd730d4
commit
4f9af77287
@ -1,22 +1,15 @@
|
||||
{pkgs, config, lib, ...}:
|
||||
|
||||
let
|
||||
|
||||
inherit (lib) mkOption mkIf;
|
||||
|
||||
inherit (pkgs) heimdalFull;
|
||||
|
||||
cfg = config.services.kerberos_server;
|
||||
stateDir = "/var/heimdal";
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.kerberos_server = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
@ -25,15 +18,13 @@ in
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.kerberos_server.enable {
|
||||
|
||||
environment.systemPackages = [ heimdalFull ];
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.heimdalFull ];
|
||||
systemd.services.kadmind = {
|
||||
description = "Kerberos Administration Daemon";
|
||||
script = "${pkgs.heimdalFull}/libexec/heimdal/kadmind";
|
||||
@ -45,13 +36,13 @@ in
|
||||
preStart = ''
|
||||
mkdir -m 0755 -p ${stateDir}
|
||||
'';
|
||||
script = "${heimdalFull}/libexec/heimdal/kdc";
|
||||
script = "${pkgs.heimdalFull}/libexec/heimdal/kdc";
|
||||
};
|
||||
|
||||
systemd.services.kpasswdd = {
|
||||
description = "Kerberos Password Changing daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
script = "${heimdalFull}/libexec/heimdal/kpasswdd";
|
||||
script = "${pkgs.heimdalFull}/libexec/heimdal/kpasswdd";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user