From 69dd091d5150303ca3fbbc76dbbf512832c92d0c Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Fri, 30 Aug 2024 00:46:56 +0200 Subject: [PATCH] nixos/services.fusionInventory: remove `with lib;` --- .../services/monitoring/fusion-inventory.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/monitoring/fusion-inventory.nix b/nixos/modules/services/monitoring/fusion-inventory.nix index 9b65c76ce02e..cb6c8a827390 100644 --- a/nixos/modules/services/monitoring/fusion-inventory.nix +++ b/nixos/modules/services/monitoring/fusion-inventory.nix @@ -1,13 +1,10 @@ # Fusion Inventory daemon. { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.fusionInventory; configFile = pkgs.writeText "fusion_inventory.conf" '' - server = ${concatStringsSep ", " cfg.servers} + server = ${lib.concatStringsSep ", " cfg.servers} logger = stderr @@ -22,18 +19,18 @@ in { services.fusionInventory = { - enable = mkEnableOption "Fusion Inventory Agent"; + enable = lib.mkEnableOption "Fusion Inventory Agent"; - servers = mkOption { - type = types.listOf types.str; + servers = lib.mkOption { + type = lib.types.listOf lib.types.str; description = '' The urls of the OCS/GLPI servers to connect to. ''; }; - extraConfig = mkOption { + extraConfig = lib.mkOption { default = ""; - type = types.lines; + type = lib.types.lines; description = '' Configuration that is injected verbatim into the configuration file. ''; @@ -44,7 +41,7 @@ in { ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { users.users.fusion-inventory = { description = "FusionInventory user";