Function( Function { head: Destructured( FunctionHeadDestructured { ellipsis: true, identifier: None, arguments: [ FunctionHeadDestructuredArgument { identifier: "config", default: None, }, FunctionHeadDestructuredArgument { identifier: "lib", default: None, }, FunctionHeadDestructuredArgument { identifier: "pkgs", default: None, }, ], }, ), body: With( With { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 3, column: 6, }, end: Position { line: 3, column: 9, }, }, }, ), target: LetIn( LetIn { bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "cfg", span: Span { start: Position { line: 6, column: 3, }, end: Position { line: 6, column: 6, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "config", span: Span { start: Position { line: 6, column: 9, }, end: Position { line: 6, column: 15, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "services", span: Span { start: Position { line: 6, column: 16, }, end: Position { line: 6, column: 24, }, }, }, ), Raw( PartRaw { content: "acpid", span: Span { start: Position { line: 6, column: 25, }, end: Position { line: 6, column: 30, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "canonicalHandlers", span: Span { start: Position { line: 8, column: 3, }, end: Position { line: 8, column: 20, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "powerEvent", span: Span { start: Position { line: 9, column: 5, }, end: Position { line: 9, column: 15, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "event", span: Span { start: Position { line: 10, column: 7, }, end: Position { line: 10, column: 12, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "button/power.*", span: Span { start: Position { line: 10, column: 16, }, end: Position { line: 10, column: 30, }, }, }, ), ], span: Span { start: Position { line: 10, column: 15, }, end: Position { line: 10, column: 31, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "action", span: Span { start: Position { line: 11, column: 7, }, end: Position { line: 11, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 11, column: 16, }, end: Position { line: 11, column: 19, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "powerEventCommands", span: Span { start: Position { line: 11, column: 20, }, end: Position { line: 11, column: 38, }, }, }, ), ], default: None, }, ), }, ), ], span: Span { start: Position { line: 9, column: 18, }, end: Position { line: 12, column: 6, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "lidEvent", span: Span { start: Position { line: 14, column: 5, }, end: Position { line: 14, column: 13, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "event", span: Span { start: Position { line: 15, column: 7, }, end: Position { line: 15, column: 12, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "button/lid.*", span: Span { start: Position { line: 15, column: 16, }, end: Position { line: 15, column: 28, }, }, }, ), ], span: Span { start: Position { line: 15, column: 15, }, end: Position { line: 15, column: 29, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "action", span: Span { start: Position { line: 16, column: 7, }, end: Position { line: 16, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 16, column: 16, }, end: Position { line: 16, column: 19, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "lidEventCommands", span: Span { start: Position { line: 16, column: 20, }, end: Position { line: 16, column: 36, }, }, }, ), ], default: None, }, ), }, ), ], span: Span { start: Position { line: 14, column: 16, }, end: Position { line: 17, column: 6, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "acEvent", span: Span { start: Position { line: 19, column: 5, }, end: Position { line: 19, column: 12, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "event", span: Span { start: Position { line: 20, column: 7, }, end: Position { line: 20, column: 12, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "ac_adapter.*", span: Span { start: Position { line: 20, column: 16, }, end: Position { line: 20, column: 28, }, }, }, ), ], span: Span { start: Position { line: 20, column: 15, }, end: Position { line: 20, column: 29, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "action", span: Span { start: Position { line: 21, column: 7, }, end: Position { line: 21, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 21, column: 16, }, end: Position { line: 21, column: 19, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "acEventCommands", span: Span { start: Position { line: 21, column: 20, }, end: Position { line: 21, column: 35, }, }, }, ), ], default: None, }, ), }, ), ], span: Span { start: Position { line: 19, column: 15, }, end: Position { line: 22, column: 6, }, }, }, ), }, ), ], span: Span { start: Position { line: 8, column: 23, }, end: Position { line: 23, column: 4, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "acpiConfDir", span: Span { start: Position { line: 25, column: 3, }, end: Position { line: 25, column: 14, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "pkgs", span: Span { start: Position { line: 25, column: 17, }, end: Position { line: 25, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "runCommand", span: Span { start: Position { line: 25, column: 22, }, end: Position { line: 25, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "acpi-events", span: Span { start: Position { line: 25, column: 34, }, end: Position { line: 25, column: 45, }, }, }, ), ], span: Span { start: Position { line: 25, column: 33, }, end: Position { line: 25, column: 46, }, }, }, ), Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "preferLocalBuild", span: Span { start: Position { line: 25, column: 49, }, end: Position { line: 25, column: 65, }, }, }, ), ], to: Identifier( Identifier { id: "true", span: Span { start: Position { line: 25, column: 68, }, end: Position { line: 25, column: 72, }, }, }, ), }, ), ], span: Span { start: Position { line: 25, column: 47, }, end: Position { line: 25, column: 75, }, }, }, ), IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "mkdir -p $out\n", span: Span { start: Position { line: 27, column: 1, }, end: Position { line: 28, column: 7, }, }, }, ), Interpolation( PartInterpolation { expression: LetIn( LetIn { bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "f", span: Span { start: Position { line: 31, column: 13, }, end: Position { line: 31, column: 14, }, }, }, ), ], to: Function( Function { head: Simple( FunctionHeadSimple { identifier: "name", }, ), body: Function( Function { head: Simple( FunctionHeadSimple { identifier: "handler", }, ), body: IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "fn=$out/", span: Span { start: Position { line: 33, column: 1, }, end: Position { line: 33, column: 21, }, }, }, ), Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "name", span: Span { start: Position { line: 33, column: 23, }, end: Position { line: 33, column: 27, }, }, }, ), }, ), Raw( PartRaw { content: "\necho \"event=", span: Span { start: Position { line: 33, column: 1, }, end: Position { line: 34, column: 25, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "handler", span: Span { start: Position { line: 34, column: 27, }, end: Position { line: 34, column: 34, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "event", span: Span { start: Position { line: 34, column: 35, }, end: Position { line: 34, column: 40, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "\" > $fn\necho \"action=", span: Span { start: Position { line: 33, column: 1, }, end: Position { line: 35, column: 26, }, }, }, ), Interpolation( PartInterpolation { expression: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "pkgs", span: Span { start: Position { line: 35, column: 28, }, end: Position { line: 35, column: 32, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "writeShellScriptBin", span: Span { start: Position { line: 35, column: 33, }, end: Position { line: 35, column: 52, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "name", span: Span { start: Position { line: 35, column: 56, }, end: Position { line: 35, column: 60, }, }, }, ), }, ), Raw( PartRaw { content: ".sh", span: Span { start: Position { line: 35, column: 54, }, end: Position { line: 35, column: 64, }, }, }, ), ], span: Span { start: Position { line: 35, column: 53, }, end: Position { line: 35, column: 65, }, }, }, ), PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "handler", span: Span { start: Position { line: 35, column: 66, }, end: Position { line: 35, column: 73, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "action", span: Span { start: Position { line: 35, column: 74, }, end: Position { line: 35, column: 80, }, }, }, ), ], default: None, }, ), ], }, ), }, ), Raw( PartRaw { content: "/bin/", span: Span { start: Position { line: 33, column: 1, }, end: Position { line: 35, column: 87, }, }, }, ), Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "name", span: Span { start: Position { line: 35, column: 89, }, end: Position { line: 35, column: 93, }, }, }, ), }, ), Raw( PartRaw { content: ".sh '%e'\" >> $fn\n", span: Span { start: Position { line: 33, column: 1, }, end: Position { line: 36, column: 11, }, }, }, ), ], span: Span { start: Position { line: 32, column: 11, }, end: Position { line: 36, column: 13, }, }, }, ), span: Span { start: Position { line: 31, column: 23, }, end: Position { line: 36, column: 13, }, }, }, ), span: Span { start: Position { line: 31, column: 17, }, end: Position { line: 36, column: 13, }, }, }, ), }, ), ], target: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "concatStringsSep", span: Span { start: Position { line: 37, column: 12, }, end: Position { line: 37, column: 28, }, }, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "\n", span: Span { start: Position { line: 37, column: 30, }, end: Position { line: 37, column: 32, }, }, }, ), ], span: Span { start: Position { line: 37, column: 29, }, end: Position { line: 37, column: 33, }, }, }, ), FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mapAttrsToList", span: Span { start: Position { line: 37, column: 35, }, end: Position { line: 37, column: 49, }, }, }, ), arguments: [ Identifier( Identifier { id: "f", span: Span { start: Position { line: 37, column: 50, }, end: Position { line: 37, column: 51, }, }, }, ), BinaryOperation( BinaryOperation { left: Identifier( Identifier { id: "canonicalHandlers", span: Span { start: Position { line: 37, column: 53, }, end: Position { line: 37, column: 70, }, }, }, ), operator: Update, right: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 37, column: 74, }, end: Position { line: 37, column: 77, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "handlers", span: Span { start: Position { line: 37, column: 78, }, end: Position { line: 37, column: 86, }, }, }, ), ], default: None, }, ), }, ), ], }, ), ], }, ), span: Span { start: Position { line: 31, column: 9, }, end: Position { line: 37, column: 88, }, }, }, ), }, ), Raw( PartRaw { content: "\n", span: Span { start: Position { line: 27, column: 1, }, end: Position { line: 39, column: 5, }, }, }, ), ], span: Span { start: Position { line: 26, column: 5, }, end: Position { line: 39, column: 7, }, }, }, ), ], }, ), }, ), ], target: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "options", span: Span { start: Position { line: 47, column: 3, }, end: Position { line: 47, column: 10, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "services", span: Span { start: Position { line: 49, column: 5, }, end: Position { line: 49, column: 13, }, }, }, ), Raw( PartRaw { content: "acpid", span: Span { start: Position { line: 49, column: 14, }, end: Position { line: 49, column: 19, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "enable", span: Span { start: Position { line: 51, column: 7, }, end: Position { line: 51, column: 13, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkEnableOption", span: Span { start: Position { line: 51, column: 16, }, end: Position { line: 51, column: 30, }, }, }, ), arguments: [ FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 51, column: 32, }, end: Position { line: 51, column: 35, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 51, column: 36, }, end: Position { line: 51, column: 41, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "the ACPI daemon", span: Span { start: Position { line: 51, column: 43, }, end: Position { line: 51, column: 58, }, }, }, ), ], span: Span { start: Position { line: 51, column: 42, }, end: Position { line: 51, column: 59, }, }, }, ), ], }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "logEvents", span: Span { start: Position { line: 53, column: 7, }, end: Position { line: 53, column: 16, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 53, column: 19, }, end: Position { line: 53, column: 27, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 54, column: 9, }, end: Position { line: 54, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 54, column: 16, }, end: Position { line: 54, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "bool", span: Span { start: Position { line: 54, column: 22, }, end: Position { line: 54, column: 26, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 55, column: 9, }, end: Position { line: 55, column: 16, }, }, }, ), ], to: Identifier( Identifier { id: "false", span: Span { start: Position { line: 55, column: 19, }, end: Position { line: 55, column: 24, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 56, column: 9, }, end: Position { line: 56, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 56, column: 23, }, end: Position { line: 56, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 56, column: 27, }, end: Position { line: 56, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "Log all event activity.", span: Span { start: Position { line: 56, column: 34, }, end: Position { line: 56, column: 57, }, }, }, ), ], span: Span { start: Position { line: 56, column: 33, }, end: Position { line: 56, column: 58, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 53, column: 28, }, end: Position { line: 57, column: 8, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "handlers", span: Span { start: Position { line: 59, column: 7, }, end: Position { line: 59, column: 15, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 59, column: 18, }, end: Position { line: 59, column: 26, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 60, column: 9, }, end: Position { line: 60, column: 13, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 60, column: 16, }, end: Position { line: 60, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "attrsOf", span: Span { start: Position { line: 60, column: 22, }, end: Position { line: 60, column: 29, }, }, }, ), ], default: None, }, ), arguments: [ FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 60, column: 31, }, end: Position { line: 60, column: 36, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "submodule", span: Span { start: Position { line: 60, column: 37, }, end: Position { line: 60, column: 46, }, }, }, ), ], default: None, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "options", span: Span { start: Position { line: 61, column: 11, }, end: Position { line: 61, column: 18, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "event", span: Span { start: Position { line: 62, column: 13, }, end: Position { line: 62, column: 18, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 62, column: 21, }, end: Position { line: 62, column: 29, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 63, column: 15, }, end: Position { line: 63, column: 19, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 63, column: 22, }, end: Position { line: 63, column: 27, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "str", span: Span { start: Position { line: 63, column: 28, }, end: Position { line: 63, column: 31, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "example", span: Span { start: Position { line: 64, column: 15, }, end: Position { line: 64, column: 22, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "literalExpression", span: Span { start: Position { line: 64, column: 25, }, end: Position { line: 64, column: 42, }, }, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "\"button/power.*\" \"button/lid.*\" \"ac_adapter.*\" \"button/mute.*\" \"button/volumedown.*\" \"cd/play.*\" \"cd/next.*\"", span: Span { start: Position { line: 64, column: 45, }, end: Position { line: 64, column: 153, }, }, }, ), ], span: Span { start: Position { line: 64, column: 43, }, end: Position { line: 64, column: 155, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 65, column: 15, }, end: Position { line: 65, column: 26, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 65, column: 29, }, end: Position { line: 65, column: 32, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 65, column: 33, }, end: Position { line: 65, column: 38, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "Event type.", span: Span { start: Position { line: 65, column: 40, }, end: Position { line: 65, column: 51, }, }, }, ), ], span: Span { start: Position { line: 65, column: 39, }, end: Position { line: 65, column: 52, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 62, column: 30, }, end: Position { line: 66, column: 14, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "action", span: Span { start: Position { line: 68, column: 13, }, end: Position { line: 68, column: 19, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 68, column: 22, }, end: Position { line: 68, column: 30, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 69, column: 15, }, end: Position { line: 69, column: 19, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 69, column: 22, }, end: Position { line: 69, column: 27, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "lines", span: Span { start: Position { line: 69, column: 28, }, end: Position { line: 69, column: 33, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 70, column: 15, }, end: Position { line: 70, column: 26, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 70, column: 29, }, end: Position { line: 70, column: 32, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 70, column: 33, }, end: Position { line: 70, column: 38, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "Shell commands to execute when the event is triggered.", span: Span { start: Position { line: 70, column: 40, }, end: Position { line: 70, column: 94, }, }, }, ), ], span: Span { start: Position { line: 70, column: 39, }, end: Position { line: 70, column: 95, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 68, column: 31, }, end: Position { line: 71, column: 14, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 61, column: 21, }, end: Position { line: 72, column: 12, }, }, }, ), }, ), ], span: Span { start: Position { line: 60, column: 47, }, end: Position { line: 73, column: 10, }, }, }, ), ], }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 75, column: 9, }, end: Position { line: 75, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 75, column: 23, }, end: Position { line: 75, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 75, column: 27, }, end: Position { line: 75, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "Event handlers.\n\n::: {.note}\nHandler can be a single command.\n:::\n", span: Span { start: Position { line: 76, column: 1, }, end: Position { line: 81, column: 9, }, }, }, ), ], span: Span { start: Position { line: 75, column: 33, }, end: Position { line: 81, column: 11, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 82, column: 9, }, end: Position { line: 82, column: 16, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [], span: Span { start: Position { line: 82, column: 19, }, end: Position { line: 82, column: 21, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "example", span: Span { start: Position { line: 83, column: 9, }, end: Position { line: 83, column: 16, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "ac-power", span: Span { start: Position { line: 84, column: 11, }, end: Position { line: 84, column: 19, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "event", span: Span { start: Position { line: 85, column: 13, }, end: Position { line: 85, column: 18, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "ac_adapter/*", span: Span { start: Position { line: 85, column: 22, }, end: Position { line: 85, column: 34, }, }, }, ), ], span: Span { start: Position { line: 85, column: 21, }, end: Position { line: 85, column: 35, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "action", span: Span { start: Position { line: 86, column: 13, }, end: Position { line: 86, column: 19, }, }, }, ), ], to: IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "vals=($1) # space separated string to array of multiple values\ncase ", span: Span { start: Position { line: 87, column: 1, }, end: Position { line: 88, column: 20, }, }, }, ), Raw( PartRaw { content: "$", span: Span { start: Position { line: 87, column: 1, }, end: Position { line: 88, column: 23, }, }, }, ), Raw( PartRaw { content: "{vals[3]} in\n 00000000)\n echo unplugged >> /tmp/acpi.log\n ;;\n 00000001)\n echo plugged in >> /tmp/acpi.log\n ;;\n *)\n echo unknown >> /tmp/acpi.log\n ;;\nesac\n", span: Span { start: Position { line: 87, column: 1, }, end: Position { line: 99, column: 13, }, }, }, ), ], span: Span { start: Position { line: 86, column: 22, }, end: Position { line: 99, column: 15, }, }, }, ), }, ), ], span: Span { start: Position { line: 84, column: 22, }, end: Position { line: 100, column: 12, }, }, }, ), }, ), ], span: Span { start: Position { line: 83, column: 19, }, end: Position { line: 101, column: 10, }, }, }, ), }, ), ], span: Span { start: Position { line: 59, column: 27, }, end: Position { line: 102, column: 8, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "powerEventCommands", span: Span { start: Position { line: 104, column: 7, }, end: Position { line: 104, column: 25, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 104, column: 28, }, end: Position { line: 104, column: 36, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 105, column: 9, }, end: Position { line: 105, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 105, column: 16, }, end: Position { line: 105, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "lines", span: Span { start: Position { line: 105, column: 22, }, end: Position { line: 105, column: 27, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 106, column: 9, }, end: Position { line: 106, column: 16, }, }, }, ), ], to: String( String_ { parts: [], span: Span { start: Position { line: 106, column: 19, }, end: Position { line: 106, column: 21, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 107, column: 9, }, end: Position { line: 107, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 107, column: 23, }, end: Position { line: 107, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 107, column: 27, }, end: Position { line: 107, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "Shell commands to execute on a button/power.* event.", span: Span { start: Position { line: 107, column: 34, }, end: Position { line: 107, column: 86, }, }, }, ), ], span: Span { start: Position { line: 107, column: 33, }, end: Position { line: 107, column: 87, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 104, column: 37, }, end: Position { line: 108, column: 8, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "lidEventCommands", span: Span { start: Position { line: 110, column: 7, }, end: Position { line: 110, column: 23, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 110, column: 26, }, end: Position { line: 110, column: 34, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 111, column: 9, }, end: Position { line: 111, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 111, column: 16, }, end: Position { line: 111, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "lines", span: Span { start: Position { line: 111, column: 22, }, end: Position { line: 111, column: 27, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 112, column: 9, }, end: Position { line: 112, column: 16, }, }, }, ), ], to: String( String_ { parts: [], span: Span { start: Position { line: 112, column: 19, }, end: Position { line: 112, column: 21, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 113, column: 9, }, end: Position { line: 113, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 113, column: 23, }, end: Position { line: 113, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 113, column: 27, }, end: Position { line: 113, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "Shell commands to execute on a button/lid.* event.", span: Span { start: Position { line: 113, column: 34, }, end: Position { line: 113, column: 84, }, }, }, ), ], span: Span { start: Position { line: 113, column: 33, }, end: Position { line: 113, column: 85, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 110, column: 35, }, end: Position { line: 114, column: 8, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "acEventCommands", span: Span { start: Position { line: 116, column: 7, }, end: Position { line: 116, column: 22, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 116, column: 25, }, end: Position { line: 116, column: 33, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 117, column: 9, }, end: Position { line: 117, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 117, column: 16, }, end: Position { line: 117, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "lines", span: Span { start: Position { line: 117, column: 22, }, end: Position { line: 117, column: 27, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 118, column: 9, }, end: Position { line: 118, column: 16, }, }, }, ), ], to: String( String_ { parts: [], span: Span { start: Position { line: 118, column: 19, }, end: Position { line: 118, column: 21, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 119, column: 9, }, end: Position { line: 119, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 119, column: 23, }, end: Position { line: 119, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 119, column: 27, }, end: Position { line: 119, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "Shell commands to execute on an ac_adapter.* event.", span: Span { start: Position { line: 119, column: 34, }, end: Position { line: 119, column: 85, }, }, }, ), ], span: Span { start: Position { line: 119, column: 33, }, end: Position { line: 119, column: 86, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 116, column: 34, }, end: Position { line: 120, column: 8, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 49, column: 22, }, end: Position { line: 122, column: 6, }, }, }, ), }, ), ], span: Span { start: Position { line: 47, column: 13, }, end: Position { line: 124, column: 4, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "config", span: Span { start: Position { line: 129, column: 3, }, end: Position { line: 129, column: 9, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkIf", span: Span { start: Position { line: 129, column: 12, }, end: Position { line: 129, column: 16, }, }, }, ), arguments: [ PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 129, column: 17, }, end: Position { line: 129, column: 20, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "enable", span: Span { start: Position { line: 129, column: 21, }, end: Position { line: 129, column: 27, }, }, }, ), ], default: None, }, ), Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "systemd", span: Span { start: Position { line: 131, column: 5, }, end: Position { line: 131, column: 12, }, }, }, ), Raw( PartRaw { content: "services", span: Span { start: Position { line: 131, column: 13, }, end: Position { line: 131, column: 21, }, }, }, ), Raw( PartRaw { content: "acpid", span: Span { start: Position { line: 131, column: 22, }, end: Position { line: 131, column: 27, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 132, column: 7, }, end: Position { line: 132, column: 18, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "ACPI Daemon", span: Span { start: Position { line: 132, column: 22, }, end: Position { line: 132, column: 33, }, }, }, ), ], span: Span { start: Position { line: 132, column: 21, }, end: Position { line: 132, column: 34, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "documentation", span: Span { start: Position { line: 133, column: 7, }, end: Position { line: 133, column: 20, }, }, }, ), ], to: List( List { elements: [ String( String_ { parts: [ Raw( PartRaw { content: "man:acpid(8)", span: Span { start: Position { line: 133, column: 26, }, end: Position { line: 133, column: 38, }, }, }, ), ], span: Span { start: Position { line: 133, column: 25, }, end: Position { line: 133, column: 39, }, }, }, ), ], span: Span { start: Position { line: 133, column: 23, }, end: Position { line: 133, column: 41, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "wantedBy", span: Span { start: Position { line: 135, column: 7, }, end: Position { line: 135, column: 15, }, }, }, ), ], to: List( List { elements: [ String( String_ { parts: [ Raw( PartRaw { content: "multi-user.target", span: Span { start: Position { line: 135, column: 21, }, end: Position { line: 135, column: 38, }, }, }, ), ], span: Span { start: Position { line: 135, column: 20, }, end: Position { line: 135, column: 39, }, }, }, ), ], span: Span { start: Position { line: 135, column: 18, }, end: Position { line: 135, column: 41, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "serviceConfig", span: Span { start: Position { line: 137, column: 7, }, end: Position { line: 137, column: 20, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "ExecStart", span: Span { start: Position { line: 138, column: 9, }, end: Position { line: 138, column: 18, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "escapeShellArgs", span: Span { start: Position { line: 138, column: 21, }, end: Position { line: 138, column: 36, }, }, }, ), arguments: [ BinaryOperation( BinaryOperation { left: List( List { elements: [ String( String_ { parts: [ Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "pkgs", span: Span { start: Position { line: 139, column: 17, }, end: Position { line: 139, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "acpid", span: Span { start: Position { line: 139, column: 22, }, end: Position { line: 139, column: 27, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "/bin/acpid", span: Span { start: Position { line: 139, column: 15, }, end: Position { line: 139, column: 38, }, }, }, ), ], span: Span { start: Position { line: 139, column: 14, }, end: Position { line: 139, column: 39, }, }, }, ), String( String_ { parts: [ Raw( PartRaw { content: "--foreground", span: Span { start: Position { line: 140, column: 15, }, end: Position { line: 140, column: 27, }, }, }, ), ], span: Span { start: Position { line: 140, column: 14, }, end: Position { line: 140, column: 28, }, }, }, ), String( String_ { parts: [ Raw( PartRaw { content: "--netlink", span: Span { start: Position { line: 141, column: 15, }, end: Position { line: 141, column: 24, }, }, }, ), ], span: Span { start: Position { line: 141, column: 14, }, end: Position { line: 141, column: 25, }, }, }, ), String( String_ { parts: [ Raw( PartRaw { content: "--confdir", span: Span { start: Position { line: 142, column: 15, }, end: Position { line: 142, column: 24, }, }, }, ), ], span: Span { start: Position { line: 142, column: 14, }, end: Position { line: 142, column: 25, }, }, }, ), String( String_ { parts: [ Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "acpiConfDir", span: Span { start: Position { line: 142, column: 29, }, end: Position { line: 142, column: 40, }, }, }, ), }, ), ], span: Span { start: Position { line: 142, column: 26, }, end: Position { line: 142, column: 42, }, }, }, ), ], span: Span { start: Position { line: 139, column: 12, }, end: Position { line: 143, column: 13, }, }, }, ), operator: Concatenation, right: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "optional", span: Span { start: Position { line: 143, column: 17, }, end: Position { line: 143, column: 25, }, }, }, ), arguments: [ PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 143, column: 26, }, end: Position { line: 143, column: 29, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "logEvents", span: Span { start: Position { line: 143, column: 30, }, end: Position { line: 143, column: 39, }, }, }, ), ], default: None, }, ), String( String_ { parts: [ Raw( PartRaw { content: "--logevents", span: Span { start: Position { line: 143, column: 41, }, end: Position { line: 143, column: 52, }, }, }, ), ], span: Span { start: Position { line: 143, column: 40, }, end: Position { line: 143, column: 53, }, }, }, ), ], }, ), }, ), ], }, ), }, ), ], span: Span { start: Position { line: 137, column: 23, }, end: Position { line: 145, column: 8, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "unitConfig", span: Span { start: Position { line: 146, column: 7, }, end: Position { line: 146, column: 17, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "ConditionVirtualization", span: Span { start: Position { line: 147, column: 9, }, end: Position { line: 147, column: 32, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "!systemd-nspawn", span: Span { start: Position { line: 147, column: 36, }, end: Position { line: 147, column: 51, }, }, }, ), ], span: Span { start: Position { line: 147, column: 35, }, end: Position { line: 147, column: 52, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "ConditionPathExists", span: Span { start: Position { line: 148, column: 9, }, end: Position { line: 148, column: 28, }, }, }, ), ], to: List( List { elements: [ String( String_ { parts: [ Raw( PartRaw { content: "/proc/acpi", span: Span { start: Position { line: 148, column: 34, }, end: Position { line: 148, column: 44, }, }, }, ), ], span: Span { start: Position { line: 148, column: 33, }, end: Position { line: 148, column: 45, }, }, }, ), ], span: Span { start: Position { line: 148, column: 31, }, end: Position { line: 148, column: 47, }, }, }, ), }, ), ], span: Span { start: Position { line: 146, column: 20, }, end: Position { line: 149, column: 8, }, }, }, ), }, ), ], span: Span { start: Position { line: 131, column: 30, }, end: Position { line: 151, column: 6, }, }, }, ), }, ), ], span: Span { start: Position { line: 129, column: 28, }, end: Position { line: 153, column: 4, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 43, column: 1, }, end: Position { line: 155, column: 2, }, }, }, ), span: Span { start: Position { line: 5, column: 1, }, end: Position { line: 155, column: 2, }, }, }, ), span: Span { start: Position { line: 3, column: 1, }, end: Position { line: 155, column: 2, }, }, }, ), span: Span { start: Position { line: 1, column: 1, }, end: Position { line: 155, column: 2, }, }, }, )