coreos / butane

Butane translates human-readable Butane Configs into machine-readable Ignition Configs.
https://coreos.github.io/butane/
Apache License 2.0
244 stars 71 forks source link

Feature request: Adds XDG folder structure creation when adding users #537

Open quentin9696 opened 2 months ago

quentin9696 commented 2 months ago

Podman strongly push to use quadlets to run containers via systemd units (https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html) When I want to create my units and my .container file, I need to always create my XDG structure first. For every user, I need to create the XDG structure, like

    - path: /home/logging/.config
      user:
        name: logging
      group:
        name: logging
    - path: /home/logging/.config/containers
      user:
        name: logging
      group:
        name: logging
    - path: /home/logging/.config/containers/systemd
      user:
        name: logging
      group:
        name: logging
    - path: /home/logging/.config/systemd
      user:
        name: logging
      group:
        name: logging
    - path: /home/logging/.config/systemd/user
      user:
        name: logging
      group:
        name: logging
    - path: /home/logging/.local
      user:
        name: logging
      group:
        name: logging
    - path: /home/logging/.local/state
      user:
        name: logging
      group:
        name: logging

I'm thinking to a way to automate the creation, but it seam that skel cannot be used (https://discussion.fedoraproject.org/t/etc-skel-not-used-for-core-user-in-fedora-coreos/36973/4?replies_to_post_number=4)

Do you have any plan to integrate the XDG folder structure when adding a new user in butane?

travier commented 2 months ago

https://github.com/coreos/butane/pull/508 might help here.

quentin9696 commented 1 month ago

@travier yes, but since XDG will requires a lot of folder at the same folder will improve a bit the number of folder declaration in butane but not resolve the main issue