diff options
Diffstat (limited to 'makefu/3modules/udpt.nix')
-rw-r--r-- | makefu/3modules/udpt.nix | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/makefu/3modules/udpt.nix b/makefu/3modules/udpt.nix deleted file mode 100644 index 18f56ab6b..000000000 --- a/makefu/3modules/udpt.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ config, lib, pkgs, ... }: - -with import <stockholm/lib>; -let - cfg = config.makefu.udpt; - - out = { - options.makefu.udpt = api; - config = lib.mkIf cfg.enable imp; - }; - - api = { - enable = mkEnableOption "udpt"; - - package = mkOption { - type = types.package; - default = pkgs.udpt; - }; - - cfgfile = mkOption { - type = types.path; - default = "${cfg.package}/etc/udpt.conf"; - }; - - user = mkOption { - description = '' - user which will run udpt. if kept default a new user will be created - ''; - type = types.str; - default = "udpt"; - }; - - }; - - imp = { - systemd.services.udpt = { - description = "udpt server"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - restartIfChanged = true; - serviceConfig = { - Type = "simple"; - ExecStart = "${cfg.package}/bin/udpt -i -c ${shell.escape cfg.cfgfile}"; - PrivateTmp = true; - WorkingDirectory = "/tmp"; - User = "${cfg.user}"; - }; - }; - users = lib.mkIf (cfg.user == "udpt") { - users.udpt = { - uid = genid "udpt"; - }; - groups.udpt.gid = genid "udpt"; - }; - }; -in -out - |