Remove "with lib" from NixOS module

This commit is contained in:
Emery Hemingway 2023-11-30 12:22:49 +02:00
parent 6797aa595a
commit 42e809cf9e
1 changed files with 9 additions and 10 deletions

View File

@ -1,8 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
{ {
options.services.syndicate = mkOption { options.services.syndicate = lib.mkOption {
default = { }; default = { };
example = { example = {
tty1 = { tty1 = {
@ -16,26 +15,26 @@ with lib;
If the key is in the form of "tty''${N}" it will If the key is in the form of "tty''${N}" it will
be attached to the appropriate teletypewriter. be attached to the appropriate teletypewriter.
''; '';
type = types.attrsOf (types.submodule { type = lib.types.attrsOf (lib.types.submodule {
options = { options = {
enable = mkEnableOption "this Syndicate dataspace server instance"; enable = lib.mkEnableOption "this Syndicate dataspace server instance";
user = mkOption { user = lib.mkOption {
type = types.str; type = lib.types.str;
example = "jane"; example = "jane";
description = "User account under which the Syndicate server runs."; description = "User account under which the Syndicate server runs.";
}; };
package = mkOption { package = lib.mkOption {
default = pkgs.syndicate-server; default = pkgs.syndicate-server;
defaultText = "pkgs.syndicate-server"; defaultText = "pkgs.syndicate-server";
type = types.package; type = lib.types.package;
description = description =
"The package to use for the Syndicate dataspace server."; "The package to use for the Syndicate dataspace server.";
}; };
config = mkOption { config = lib.mkOption {
type = types.listOf types.path; type = lib.types.listOf lib.types.path;
description = "Configurations to load."; description = "Configurations to load.";
example = [ "/etc/syndicate" ]; example = [ "/etc/syndicate" ];
}; };