Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/glpi-agent: init #361759

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

liberodark
Copy link
Contributor

@liberodark liberodark commented Dec 4, 2024

Fix : #361741
This PR is module for : #361746

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Dec 4, 2024
@liberodark liberodark force-pushed the glpi-agent-module branch 3 times, most recently from 22c6bd6 to 3965250 Compare December 4, 2024 14:45
@liberodark
Copy link
Contributor Author

How to work :

# Enable GLPI Agent
  services.glpiAgent = {
    enable = true;    
    servers = [ "https://server.com" ];
    extraConfig = ''
      delaytime = 3600
      lazy = 0
      scan-homedirs = 0
      scan-profiles = 0
      html = 0
      backend-collect-timeout = 30
      force = 1
      no-p2p = 0
      user = USER
      password = PASSWORD
      timeout = 180
      no-httpd = 0
      logger = stderr
      logfacility = LOG_USER
      color = 0
      debug = 0
    '';
  };

@liberodark
Copy link
Contributor Author

Also this need a backport to 24.11 if is possible is tested and used on 24.11

@h7x4 h7x4 added the 8.has: module (new) This PR adds a module in `nixos/` label Dec 8, 2024
@liberodark liberodark force-pushed the glpi-agent-module branch 5 times, most recently from 9c7cfdf to 9a03b8d Compare December 13, 2024 10:25
nixos/modules/services/monitoring/glpi-agent.nix Outdated Show resolved Hide resolved
nixos/modules/services/monitoring/glpi-agent.nix Outdated Show resolved Hide resolved
nixos/modules/services/monitoring/glpi-agent.nix Outdated Show resolved Hide resolved
nixos/modules/services/monitoring/glpi-agent.nix Outdated Show resolved Hide resolved
nixos/modules/services/monitoring/glpi-agent.nix Outdated Show resolved Hide resolved
nixos/modules/services/monitoring/glpi-agent.nix Outdated Show resolved Hide resolved
nixos/modules/services/monitoring/glpi-agent.nix Outdated Show resolved Hide resolved
nixos/modules/services/monitoring/glpi-agent.nix Outdated Show resolved Hide resolved
nixos/modules/services/monitoring/glpi-agent.nix Outdated Show resolved Hide resolved
@liberodark liberodark force-pushed the glpi-agent-module branch 4 times, most recently from 8dda0d2 to 43b340c Compare December 19, 2024 15:34
@liberodark liberodark force-pushed the glpi-agent-module branch 4 times, most recently from bfb0179 to 5528c1e Compare January 6, 2025 19:31
@liberodark liberodark force-pushed the glpi-agent-module branch 3 times, most recently from f947cce to b82c538 Compare January 7, 2025 13:30
@liberodark liberodark force-pushed the glpi-agent-module branch 2 times, most recently from 37e765f to fb92f51 Compare January 7, 2025 15:00
@liberodark liberodark force-pushed the glpi-agent-module branch 2 times, most recently from c16f6c0 to c5b2f65 Compare January 8, 2025 10:42
@liberodark liberodark force-pushed the glpi-agent-module branch 4 times, most recently from a876968 to ee36818 Compare January 9, 2025 09:57
Comment on lines +43 to +44
settings = lib.mkOption {
type = settingsType;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we go RFC42-style freeformType here ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it doesn't support arbitrary nesting?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do wonder if there's a way to reuse one of the existing writers for this though.

Copy link
Contributor Author

@liberodark liberodark Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

settingsType seems more relevant to me compared to GLPI but I could be wrong.
https://glpi-agent.readthedocs.io/en/latest/configuration.html#parameter-syntax


services.glpiAgent = {
    enable = true;
    settings = {
      server = [ "https://server.com" ];
      delaytime = 3600;
      lazy = false;
      "scan-homedirs" = false;
      "scan-profiles" = false;
      html = false;
      "backend-collect-timeout" = 30;
      force = true;
      "no-p2p" = false;
      tasks = [ "inventory" ];
      user = "USER";
      password = "PWD";
      timeout = 180;
      "no-httpd" = true;
      logger = [ "stderr" ];
      logfacility = "LOG_USER";
      color = false;
      debug = 0;
    };
  };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: glpi-agent
5 participants