| garciadeblas | 83775ba | 2025-07-23 18:35:24 +0200 | [diff] [blame] | 1 | ####################################################################################### |
| 2 | # Copyright ETSI Contributors and Others. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 13 | # implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | ####################################################################################### |
| 17 | |
| 18 | # Nushell Config File |
| 19 | # |
| 20 | |
| 21 | |
| 22 | # Default config |
| 23 | $env.config.color_config = { |
| 24 | separator: white |
| 25 | leading_trailing_space_bg: { attr: n } |
| 26 | header: green_bold |
| 27 | empty: blue |
| 28 | bool: light_cyan |
| 29 | int: white |
| 30 | filesize: cyan |
| 31 | duration: white |
| 32 | datetime: purple |
| 33 | range: white |
| 34 | float: white |
| 35 | string: white |
| 36 | nothing: white |
| 37 | binary: white |
| 38 | cell-path: white |
| 39 | row_index: green_bold |
| 40 | record: white |
| 41 | list: white |
| 42 | closure: green_bold |
| 43 | glob:cyan_bold |
| 44 | block: white |
| 45 | hints: dark_gray |
| 46 | search_result: { bg: red fg: white } |
| 47 | shape_binary: purple_bold |
| 48 | shape_block: blue_bold |
| 49 | shape_bool: light_cyan |
| 50 | shape_closure: green_bold |
| 51 | shape_custom: green |
| 52 | shape_datetime: cyan_bold |
| 53 | shape_directory: cyan |
| 54 | shape_external: cyan |
| 55 | shape_externalarg: green_bold |
| 56 | shape_external_resolved: light_yellow_bold |
| 57 | shape_filepath: cyan |
| 58 | shape_flag: blue_bold |
| 59 | shape_float: purple_bold |
| 60 | shape_glob_interpolation: cyan_bold |
| 61 | shape_globpattern: cyan_bold |
| 62 | shape_int: purple_bold |
| 63 | shape_internalcall: cyan_bold |
| 64 | shape_keyword: cyan_bold |
| 65 | shape_list: cyan_bold |
| 66 | shape_literal: blue |
| 67 | shape_match_pattern: green |
| 68 | shape_matching_brackets: { attr: u } |
| 69 | shape_nothing: light_cyan |
| 70 | shape_operator: yellow |
| 71 | shape_pipe: purple_bold |
| 72 | shape_range: yellow_bold |
| 73 | shape_record: cyan_bold |
| 74 | shape_redirection: purple_bold |
| 75 | shape_signature: green_bold |
| 76 | shape_string: green |
| 77 | shape_string_interpolation: cyan_bold |
| 78 | shape_table: blue_bold |
| 79 | shape_variable: purple |
| 80 | shape_vardecl: purple |
| 81 | shape_raw_string: light_purple |
| 82 | shape_garbage: { |
| 83 | fg: white |
| 84 | bg: red |
| 85 | attr: b |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | |
| 90 | # Remove Nushell's welcome message |
| 91 | # -------------------------------- |
| 92 | $env.config.show_banner = false |
| 93 | |
| 94 | |
| 95 | # NU_LIB_DIRS |
| 96 | # ----------- |
| 97 | # Directories in this environment variable are searched by the |
| 98 | # `use` and `source` commands. |
| 99 | # It is searched after the NU_LIB_DIRS constant. |
| 100 | # |
| 101 | $env.NU_LIB_DIRS ++= [ "/app/osm" ] |
| 102 | |
| 103 | |
| 104 | # Load the model and environment parameters |
| 105 | # ----------------------------------------- |
| 106 | let clear_environment_location: path = ($env.CLEAR_ENVIRONMENT_LOCATION? | default "/model/parameters/clear/environment.yaml") |
| 107 | let secret_environment_location: path = ($env.SECRET_ENVIRONMENT_LOCATION? | default "/model/parameters/secret/environment.yaml") |
| 108 | let model_location: path = ($env.MODEL_LOCATION? | default "/model/app_instance_model.yaml") |
| 109 | let environment: record = ( |
| 110 | open $clear_environment_location | default {} |
| 111 | | merge ( |
| 112 | open $secret_environment_location | default {} |
| 113 | ) |
| 114 | ) |
| 115 | let model_instance: record = (open $model_location | default {}) |
| 116 | |
| 117 | |
| 118 | # Load the required library |
| 119 | use /app/osm/operations/app.nu |