Skip to content

Commit

Permalink
Add personalisation section.
Browse files Browse the repository at this point in the history
  • Loading branch information
roddhjav committed Feb 5, 2022
1 parent dc19fc7 commit 940ffa0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,35 @@ DENIED dnsmasq open /proc/cmdline comm=dnsmasq requested_mask=r denied_mask=r
```


## Personalisation

**AppArmor configuration**

As they are a lot of rules, it is recommended to enable caching AppArmor profiles.
In `/etc/apparmor/parser.conf`, uncomment `write-cache`.
See [Speed up AppArmor Start] on the Arch Wiki for more information.


**Personal directories**

The profiles heavily use the XDG directory variables defined in `/etc/apparmor.d/tunables/xdg-user-dirs`. You can personalise these values with by creating a
file such as `/etc/apparmor.d/tunables/xdg-user-dirs.d/perso` with (for example)
the following content:
```sh
@{XDG_VIDEOS_DIR}+="Films"
@{XDG_MUSIC_DIR}+="Musique"
@{XDG_PICTURES_DIR}+="Images"
@{XDG_BOOKS_DIR}+="BD" "Comics"
@{XDG_PROJECTS_DIR}+="Git" "Papers"
```

**Local profiles**

You can extend a profile with your own rules by creating a file in the
`/etc/apparmor.d/local/` directory. For example, to extend the `gnome-shell`
profile, create a file `/etc/apparmor.d/local/gnome-shell` and add your rules.
Then, reload the apparmor rules with `sudo systemctl restart apparmor`.

## Tests

A full test suite to ensure compatibility across distributions and softwares is still a work in progress.
Expand Down Expand Up @@ -176,3 +205,4 @@ with this program; if not, write to the Free Software Foundation, Inc.,

[android_model]: https://arxiv.org/pdf/1904.05572
[clipos]: https://clip-os.org/en/
[Speed up AppArmor Start]: https://wiki.archlinux.org/title/AppArmor#Speed-up_AppArmor_start_by_caching_profiles

0 comments on commit 940ffa0

Please sign in to comment.