nixos/services.create_ap: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-28 21:19:04 +02:00 committed by Jörg Thalheim
parent 7fcd972c94
commit 4589149299

View File

@ -1,16 +1,13 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.create_ap;
configFile = pkgs.writeText "create_ap.conf" (generators.toKeyValue { } cfg.settings);
configFile = pkgs.writeText "create_ap.conf" (lib.generators.toKeyValue { } cfg.settings);
in {
options = {
services.create_ap = {
enable = mkEnableOption "setting up wifi hotspots using create_ap";
settings = mkOption {
type = with types; attrsOf (oneOf [ int bool str ]);
enable = lib.mkEnableOption "setting up wifi hotspots using create_ap";
settings = lib.mkOption {
type = with lib.types; attrsOf (oneOf [ int bool str ]);
default = {};
description = ''
Configuration for `create_ap`.
@ -27,7 +24,7 @@ in {
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
systemd = {
services.create_ap = {