---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "oxidized",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (9, 3),
        },
        Raw {
         content: "services",
         position: (9, 11),
        },
        Raw {
         content: "oxidized",
         position: (9, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (10, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (10, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "the oxidized configuration backup service",
              position: (10, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "user",
            position: (12, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (12, 12),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (13, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (13, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (13, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (14, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "oxidized",
                 position: (14, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (15, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "User under which the oxidized service runs.\n",
                 position: (16, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (12, 21),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "group",
            position: (20, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (20, 13),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (21, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (21, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (21, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (22, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "oxidized",
                 position: (22, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (23, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Group under which the oxidized service runs.\n",
                 position: (24, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (20, 22),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "dataDir",
            position: (28, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (28, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (29, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (29, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "path",
                  position: (29, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (30, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/var/lib/oxidized",
                 position: (30, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (31, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "State directory for the oxidized service.",
                 position: (31, 22),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (28, 24),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "configFile",
            position: (34, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (34, 18),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (35, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (35, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "path",
                  position: (35, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (36, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (36, 17),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "pkgs.writeText \"oxidized-config.yml\" ",
                   position: (37, 1),
                  },
                  Raw {
                   content: "''",
                   position: (37, 46),
                  },
                  Raw {
                   content: "\n  ---\n  debug: true\n  use_syslog: true\n  input:\n    default: ssh\n    ssh:\n      secure: true\n  interval: 3600\n  model_map:\n    dell: powerconnect\n    hp: procurve\n  source:\n    default: csv\n    csv:\n      delimiter: !ruby/regexp /:/\n      file: \"/var/lib/oxidized/.config/oxidized/router.db\"\n      map:\n        name: 0\n        model: 1\n        username: 2\n        password: 3\n  pid: \"/var/lib/oxidized/.config/oxidized/pid\"\n  rest: 127.0.0.1:8888\n  retries: 3\n  # ... additional config\n",
                   position: (37, 49),
                  },
                  Raw {
                   content: "''",
                   position: (63, 9),
                  },
                  Raw {
                   content: ";\n",
                   position: (63, 12),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (65, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Path to the oxidized configuration file.\n",
                 position: (66, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (34, 27),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "routerDB",
            position: (70, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (70, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (71, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (71, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "path",
                  position: (71, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (72, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (72, 17),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "pkgs.writeText \"oxidized-router.db\" ",
                   position: (73, 1),
                  },
                  Raw {
                   content: "''",
                   position: (73, 45),
                  },
                  Raw {
                   content: "\n  hostname-sw1:powerconnect:username1:password2\n  hostname-sw2:procurve:username2:password2\n  # ... additional hosts\n",
                   position: (73, 48),
                  },
                  Raw {
                   content: "''",
                   position: (77, 9),
                  },
                  Raw {
                   content: "\n",
                   position: (77, 12),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (79, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Path to the file/database which contains the targets for oxidized.\n",
                 position: (80, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (70, 25),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (9, 31),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (85, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (85, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (85, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (85, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (86, 5),
             },
             Raw {
              content: "groups",
              position: (86, 11),
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (86, 20),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "group",
                  position: (86, 24),
                 },
                ],
               },
               default: None,
              },
             },
            ],
           },
           Map {
            bindings: [],
            recursive: false,
            position: (86, 33),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (87, 5),
             },
             Raw {
              content: "users",
              position: (87, 11),
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (87, 19),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "user",
                  position: (87, 23),
                 },
                ],
               },
               default: None,
              },
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (88, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Oxidized service user",
                 position: (88, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "group",
                 position: (89, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (89, 15),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "group",
                  position: (89, 19),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "home",
                 position: (90, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (90, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "dataDir",
                  position: (90, 18),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "createHome",
                 position: (91, 7),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (91, 20),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "isSystemUser",
                 position: (92, 7),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (92, 22),
              },
             ),
            ],
            recursive: false,
            position: (87, 31),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (95, 5),
             },
             Raw {
              content: "services",
              position: (95, 13),
             },
             Raw {
              content: "oxidized",
              position: (95, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (96, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (96, 21),
                  },
                 ],
                },
               ],
               position: (96, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (97, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (97, 18),
                  },
                 ],
                },
               ],
               position: (97, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "preStart",
                 position: (99, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "mkdir -p ",
                 position: (100, 1),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (100, 20),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "dataDir",
                     position: (100, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/.config/oxidized\nln -f -s ",
                 position: (100, 32),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (101, 20),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "routerDB",
                     position: (101, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: " ",
                 position: (101, 33),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (101, 36),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "dataDir",
                     position: (101, 40),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/.config/oxidized/router.db\nln -f -s ",
                 position: (101, 48),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (102, 20),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "configFile",
                     position: (102, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: " ",
                 position: (102, 35),
                },
                Expression {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (102, 38),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "dataDir",
                     position: (102, 42),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/.config/oxidized/config\n",
                 position: (102, 50),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (105, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (106, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (106, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "oxidized",
                        position: (106, 29),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/oxidized",
                    position: (106, 38),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "User",
                    position: (107, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (107, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "user",
                     position: (107, 20),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Group",
                    position: (108, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (108, 17),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "group",
                     position: (108, 21),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "UMask",
                    position: (109, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "0077",
                    position: (109, 18),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "NoNewPrivileges",
                    position: (110, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (110, 27),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (111, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "always",
                    position: (111, 21),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "WorkingDirectory",
                    position: (112, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (112, 28),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "dataDir",
                     position: (112, 32),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "KillSignal",
                    position: (113, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "SIGKILL",
                    position: (113, 23),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "PIDFile",
                    position: (114, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (114, 22),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "dataDir",
                        position: (114, 26),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/.config/oxidized/pid",
                    position: (114, 34),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (105, 23),
              },
             ),
            ],
            recursive: false,
            position: (95, 33),
           },
          ),
         ],
         recursive: false,
         position: (85, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (8, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}