[Custom Image] How can I copy/move folders and files to the user's home?

I’m trying to copy/move folders and files to the user’s home, but I don’t understand the instructions in the documentation

common.yml:

modules:

  - type: files
    files:
      - homedir: /usr/etc/homedir
      - usr: /usr # copy static configurations
                  # configuration you wish to end up in /etc/ on the booted system should be
                  # added into /usr/etc/ as that is the proper "distro" config directory on ostree
                  # read more in the files module's README

Inside the homedir folder:
image

Is common.yml right or is it another way?

I understood how to move the files [solved]

1 Like

@Heus-Sueh, could you please share how you’ve approached this?

1 Like

you can put the dotfiles in /usr/etc/skel/ which is the directory that will be the “skeleton” of the user’s home.

or you can create something similar to what I did which is create a “homedir” folder and then copy the its contents to /usr/etc/skel, but this last method didn’t work very well for me because the files that are hidden were not copied when building the image
image
image

3 Likes

I was also lost, I had learned about this directory when I was playing around with creating a customized Arch Linux iso, but I forgot about this directory because I hadn’t used it in a while

1 Like