Last active 1749285176

x11.toml Raw
1name: x11
2description: GUI LXD profile
3config:
4 environment.DISPLAY: :0
5 environment.PULSE_SERVER: unix:/home/.pulse-native
6 user.user-data: |
7 #cloud-config
8 packages:
9 - x11-apps
10 - mesa-utils
11 - pulseaudio
12 - acl
13 users:
14 - name: hd
15 groups: adm, dialout, cdrom, floppy, sudo, audio, dip, video, plugdev, netdev, lxd
16 sudo: ALL=(ALL) NOPASSWD:ALL
17 ssh_authorized_keys:
18 - ssh-ed25519 REDACTED
19 write_files:
20 - content: |
21 [Unit]
22 Description=/etc/rc.local Compatibility
23 ConditionPathExists=/etc/rc.local
24
25 [Service]
26 Type=forking
27 ExecStart=/etc/rc.local start
28 TimeoutSec=0
29 StandardOutput=tty
30 RemainAfterExit=yes
31 SysVStartPriority=99
32
33 [Install]
34 WantedBy=multi-user.target
35 path: /etc/systemd/system/rc-local.service
36 owner: root:root
37 permissions: '0644'
38 - content: |
39 #!/bin/bash
40 setfacl -m "u:hd:rw-" /dev/dri/*
41 path: /etc/rc.local
42 owner: root:root
43 permissions: '0744'
44
45 runcmd:
46 - 'sed -i "s/; enable-shm = yes/enable-shm = no/g" /etc/pulse/client.conf'
47 - 'systemctl enable rc-local'
48devices:
49 PASocket1:
50 bind: container
51 connect: unix:/run/user/1000/pulse/native
52 gid: "1000"
53 listen: unix:/home/.pulse-native
54 mode: "0777"
55 security.gid: "1000"
56 security.uid: "1000"
57 type: proxy
58 uid: "1000"
59 X0:
60 bind: container
61 connect: unix:@/tmp/.X11-unix/X0
62 listen: unix:@/tmp/.X11-unix/X0
63 security.gid: "1000"
64 security.uid: "1000"
65 type: proxy
66 mygpu:
67 type: gpu