nixos/services.tiddlywiki: remove with lib;
This commit is contained in:
parent
2ecc659ae8
commit
d279b64dc1
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user