mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-09 12:05:50 +03:00
nixos/services.fusionInventory: remove with lib;
This commit is contained in:
parent
699ee515a1
commit
69dd091d51
1 changed files with 7 additions and 10 deletions
|
@ -1,13 +1,10 @@
|
||||||
# Fusion Inventory daemon.
|
# Fusion Inventory daemon.
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.fusionInventory;
|
cfg = config.services.fusionInventory;
|
||||||
|
|
||||||
configFile = pkgs.writeText "fusion_inventory.conf" ''
|
configFile = pkgs.writeText "fusion_inventory.conf" ''
|
||||||
server = ${concatStringsSep ", " cfg.servers}
|
server = ${lib.concatStringsSep ", " cfg.servers}
|
||||||
|
|
||||||
logger = stderr
|
logger = stderr
|
||||||
|
|
||||||
|
@ -22,18 +19,18 @@ in {
|
||||||
|
|
||||||
services.fusionInventory = {
|
services.fusionInventory = {
|
||||||
|
|
||||||
enable = mkEnableOption "Fusion Inventory Agent";
|
enable = lib.mkEnableOption "Fusion Inventory Agent";
|
||||||
|
|
||||||
servers = mkOption {
|
servers = lib.mkOption {
|
||||||
type = types.listOf types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
description = ''
|
description = ''
|
||||||
The urls of the OCS/GLPI servers to connect to.
|
The urls of the OCS/GLPI servers to connect to.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = lib.mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
type = types.lines;
|
type = lib.types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
Configuration that is injected verbatim into the configuration file.
|
Configuration that is injected verbatim into the configuration file.
|
||||||
'';
|
'';
|
||||||
|
@ -44,7 +41,7 @@ in {
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
users.users.fusion-inventory = {
|
users.users.fusion-inventory = {
|
||||||
description = "FusionInventory user";
|
description = "FusionInventory user";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue