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
description = ''
Configuration options that will be written to the configuration file.
'';
example = ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be an RFC42-style attrset?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi,

I based myself on the previous modules.

Best Regards

Copy link
Contributor

Choose a reason for hiding this comment

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

That doesn't mean it's the right thing to do. See RFC 42.

Copy link
Contributor

Choose a reason for hiding this comment

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

How is this resolved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have remove obvious description

Copy link
Contributor

Choose a reason for hiding this comment

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

That's not my point. Please read RFC 42.

@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
Group = "root";
Restart = "on-failure";
StateDirectory = "glpi-agent";
RuntimeDirectory = "glpi-agent";
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this actually used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes RuntimeDirectory is not more needed now that have been removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But other is used to run correctly the service.

User = "root";
Restart = "on-failure";
StateDirectory = "glpi-agent";
WorkingDirectory = "/var/lib/glpi-agent";
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this also necessary?

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
4 participants