nixos/services.tiddlywiki: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-30 00:46:51 +02:00
parent 2ecc659ae8
commit d279b64dc1

View File

@ -1,11 +1,8 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.tiddlywiki;
listenParams = concatStrings (mapAttrsToList (n: v: " '${n}=${toString v}' ") cfg.listenOptions);
listenParams = lib.concatStrings (lib.mapAttrsToList (n: v: " '${n}=${toString v}' ") cfg.listenOptions);
exe = "${pkgs.nodePackages.tiddlywiki}/lib/node_modules/.bin/tiddlywiki";
name = "tiddlywiki";
dataDir = "/var/lib/" + name;
@ -14,10 +11,10 @@ in {
options.services.tiddlywiki = {
enable = mkEnableOption "TiddlyWiki nodejs server";
enable = lib.mkEnableOption "TiddlyWiki nodejs server";
listenOptions = mkOption {
type = types.attrs;
listenOptions = lib.mkOption {
type = lib.types.attrs;
default = {};
example = {
credentials = "../credentials.csv";
@ -32,7 +29,7 @@ in {
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
systemd = {
services.tiddlywiki = {
description = "TiddlyWiki nodejs server";