-
Notifications
You must be signed in to change notification settings - Fork 0
/
org.freedesktop.DevEnv.yaml
132 lines (127 loc) · 4.36 KB
/
org.freedesktop.DevEnv.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
app-id: org.freedesktop.DevEnv
runtime: org.freedesktop.Sdk
runtime-version: '22.08'
sdk: org.freedesktop.Sdk
command: devenv
finish-args:
# development permissions
# devel allow access to profiling syscalls (perf, ptrace,..)
- --allow=devel
# execute code for different architecture than the host
- --allow=multiarch
# permissive host access
# this type of permissive permission you might want to globally override
# access to all devices means being able to read from and to any host pty
- --device=all
- --filesystem=home
- --filesystem=host
# unfiltered dbus sessions access
- --socket=session-bus
- --socket=system-bus
# flatpak-spawn can run any host command
# explicitly enabled even though it's already covered by --socket=session-bus
- --talk-name=org.freedesktop.Flatpak
# display server
- --device=dri
- --share=ipc
- --socket=wayland
- --socket=x11
# networking
- --share=network
# devenv
- --filesystem=/var/lib/devenv
# code
- --filesystem=~/projects
# ccache
- --filesystem=xdg-cache/ccache
# gocache
- --filesystem=xdg-cache/go-build
#- --filesystem=xdg-cache/gocache
#- --env=GOCACHE=~/.cache/gocache
# sccache
- --filesystem=xdg-cache/sccache
- --env=SCCACHE_BIN=/usr/lib/sdk/sccache/bin/sccache
#- --env=SCCACHE_DIR=~/.cache/sccache
- --env=SCCACHE_CONF=~/.cache/sccache/config
- --env=RUSTC_WRAPPER=sccache
# dots
# apps must have a connecting symlink to .user if tool's home cannot be set via envvar to ~/.config/...
# `$ ln -s ../../../.user ~/.var/app/FLATPAK_ID/.user`
# only needed if the tool's config folder was mounted with `--filesystem=xdg-config/...` as `~/.config/...` won't be mounted in .var
- --filesystem=~/.local/bin:ro
- --filesystem=~/.user/dots:ro
- --filesystem=~/.user/hiddendots:ro
# bash
- --filesystem=xdg-config/bash:ro
# broot
- --filesystem=xdg-cache/broot:ro
# ccache
- --filesystem=xdg-cache/ccache
# flatpak
# aliases
- --filesystem=xdg-data/flatpak-run-cli:ro
# fish
- --filesystem=xdg-config/fish:ro
- --filesystem=xdg-data/fish:ro
# foot
- --filesystem=xdg-config/foot:ro
# git
- --filesystem=xdg-config/git:ro
# gnupg
#- --filesystem=xdg-config/gnupg:ro
# less
# new less versions don't need a binary lesskey.bin, source default to XDG_CONFIG_HOME/lesskey,
# only LESSKEYIN envvar needed for host compat
#- --filesystem=xdg-config/lesskey:ro #
# man
# this works because .local/bin is in PATH
# for more details, see tmpfiles.d configs packaged with the extension
- --filesystem=xdg-data/man
# neovim
- --filesystem=xdg-config/nvim:ro
- --filesystem=xdg-data/nvim:ro
# python
- --env=AUTO_PYENV_ROOT=1
# ranger
# folder must be writable
- --filesystem=xdg-config/ranger
# ssh
- --filesystem=xdg-config/ssh:ro
# my secret store for storing keys, needed due to symlinks from xdg-config/ssh
#- --filesystem=~/.user/hiddendots/openssh:ro
# this is the location of my ssh-agent's socket, and likely not needed anymore with new flatpak releases
# --filesystem=xdg-run/ssh-agent:ro
# for app/sandbox specific setting, like automatically added known hosts
- --persist=.ssh
# only needed with older than flatpak 1.11.1 https://github.com/flatpak/flatpak/commit/0e0e98e7ef0498946d8172ac6d266679434aab6a
#- --env=SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent/sock
# TODO: this should be already enabled in recent flatpak releases, check the code
# this might be already enabled, it only beeing used by gnome-keyring's agent, and basically bind mounts bind-mounts the xdg-run/ssh-auth
- --socket=ssh-auth
# when using a non-default config folder you should explicitly set IdentityFile in the config
# Host *
# IdentityFile ~/.config/ssh/id_rsa
# IdentityFile ...
# terminal multiplexer
# byobu
#- --filesystem=xdg-config/byobu/.ssh-agent
# tmux
#- --filesystem=xdg-run/tmux
# terminfo: use updated db
# disabled as it's already set by the enable.sh script, but kept here for documentation
#- '--env=TERMINFO_DIRS=/usr/lib/sdk/devenv/share/terminfo:'
# zsh
- --filesystem=xdg-cache/zsh
- --filesystem=xdg-config/zsh:ro
- --filesystem=xdg-data/zsh:ro
modules:
- name: devenv
buildsystem: simple
build-commands:
- install -Dm755 devenv -t ${FLATPAK_DEST}/bin/
sources:
- type: script
dest-filename: devenv
commands:
- source /usr/lib/sdk/devenv/bin/enable-devenv
- exec bash