nixos/services.fusionInventory: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-30 00:46:56 +02:00
parent 699ee515a1
commit 69dd091d51

View File

@ -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";