Last active 1749285176

hd's Avatar hd revised this gist 1749285176. Go to revision

1 file changed, 1 insertion

x11.toml

@@ -9,6 +9,7 @@ config:
9 9 - x11-apps
10 10 - mesa-utils
11 11 - pulseaudio
12 + - acl
12 13 users:
13 14 - name: hd
14 15 groups: adm, dialout, cdrom, floppy, sudo, audio, dip, video, plugdev, netdev, lxd

hd's Avatar hd revised this gist 1749285034. Go to revision

1 file changed, 66 insertions

x11.toml(file created)

@@ -0,0 +1,66 @@
1 + name: x11
2 + description: GUI LXD profile
3 + config:
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'
47 + devices:
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
Newer Older