Last active 1749285176

Revision e4963c844d52475db0cf2d680945e40dc028511b

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