Resources are a way to easily attach files to your flakes using MyNixOS.
They can be used for options where a NixOS path type is expected.
At the option screen, a new resource may be created either by clicking the "Resource" button and selecting "Browse", or by dragging and dropping a file onto the option value.
Existing flake resources may be selected from the "Resource" button dropdown menu.
Resources created from archive file types are treated as directories, while other file types are treated as single files. This means that the resulting Nix path within the generated Nix code will refer to a directory for resources created from archive file types, and to specific file paths for resources created from other file types.
Resources can be managed from the flake resources screen. New resources may be created with the "Browse" button", and existing resources may be deleted by clicking the red delete button to the right when hovering a resource entry.
Deleting a resource will break any flake version referencing the resource.
When creating a resource, the contents are uploaded to cloud storage.
In the Nix code generated when releasing a flake, each resource is referenced using the Nix function
builtins.fetchTarball. This means that the contents of a resource is not stored together with each flake version in order to avoid bloat.
Generated Nix code references resource objects with their SHA-256 checksum, ensuring that contents cannot be altered.