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 2 commits 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 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
@liberodark liberodark force-pushed the glpi-agent-module branch 2 times, most recently from 40757a5 to 4549bbd Compare January 10, 2025 12:54
@liberodark liberodark force-pushed the glpi-agent-module branch 2 times, most recently from 6127a98 to 5d287e2 Compare January 17, 2025 19:45
@github-actions github-actions bot added 8.has: documentation This PR adds or changes documentation 8.has: changelog labels Jan 20, 2025
assertions = [
{
assertion = cfg.settings ? server;
message = "GLPI Agent requires a server to be configured in settings.server";
Copy link
Member

Choose a reason for hiding this comment

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

We should name the full option path here.

serviceConfig = {
ExecStart = "${lib.getExe cfg.package} --conf-file ${configFile} --vardir ${cfg.stateDir} --daemon --no-fork";
Restart = "on-failure";
StateDirectory = "glpi-agent";
Copy link
Member

Choose a reason for hiding this comment

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

That conflicts with the stateDir option above, doesn't it?

serviceConfig = {
ExecStart = "${lib.getExe cfg.package} --conf-file ${configFile} --vardir ${cfg.stateDir} --daemon --no-fork";
Restart = "on-failure";
StateDirectory = "glpi-agent";
Copy link
Member

Choose a reason for hiding this comment

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

That conflicts with the stateDir option above, doesn't it?

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: changelog 8.has: documentation This PR adds or changes documentation 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