Skip to content

File Configuration

Poly edited this page Jun 8, 2021 · 1 revision

All available options for telling ix how to handle a specific file.

Note: Any ix configuration option can contain ix variables within itself as well as environment variables


ix-config

The declaration that turns a file into something that ix will process. It must show up within the first 20 lines of the file.


prefix

Custom symbol for the variable inclusion syntax.

Note: This field (if used) needs to be the first thing in the configuration (after the declaration)

The default is # so variables are included like so #{{ variable.name }}

The prefix can be any symbol(s) you want, e.g:

#: ix-config
#: prefix: ¤

echo ¤{{ magical.variable }}

to | out

The output directory for the file.

If the directory does not exist, it will be created before saving the file.

If not specified, the file will be added to the same directory as the original one, but with an .ix extension so it doesn't overwrite the original one (unlesss specified otherwise with the as key).

#: ix-config
#: to: /dev

as | name

The name of the processed file. This is what the processed file will be saved as.

If not specified, the file will be saved under the same name.

#: ix-config
#: as: script.sh

access

Custom permissions to be set on the created file.

They will be set using python's chmod implementation so all numeric values will work. You can't do +x and the likes though, you'll have to do a numeric value.

#: ix-config
#: access: 777

echo "This file is executable"

All together now:

#: ix-config
#: prefix: ¤
#: to: $HOME/¤{{ user.images }}/
#: as: new_profile.png
#: access: 777

Clone this wiki locally