1 # Fusion Inventory daemon.
2 { config, lib, pkgs, ... }:
7 cfg = config.services.fusionInventory;
9 configFile = pkgs.writeText "fusion_inventory.conf" ''
10 server = ${concatStringsSep ", " cfg.servers}
23 services.fusionInventory = {
25 enable = mkEnableOption "Fusion Inventory Agent";
28 type = types.listOf types.str;
30 The urls of the OCS/GLPI servers to connect to.
34 extraConfig = mkOption {
38 Configuration that is injected verbatim into the configuration file.
47 config = mkIf cfg.enable {
49 users.users.fusion-inventory = {
50 description = "FusionInventory user";
54 systemd.services.fusion-inventory = {
55 description = "Fusion Inventory Agent";
56 wantedBy = [ "multi-user.target" ];
59 ExecStart = "${pkgs.fusionInventory}/bin/fusioninventory-agent --conf-file=${configFile} --daemon --no-fork";