# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{bin}/nvidia-settings
profile nvidia-settings @{exec_path} {
  include <abstractions/base>
  include <abstractions/dconf-write>
  include <abstractions/desktop>
  include <abstractions/nvidia-strict>

  @{exec_path} mr,

  /usr/share/pixmaps/{,**} r,

  owner @{HOME}/.nvidia-settings-rc rw,

  @{sys}/bus/pci/devices/ r,
  @{sys}/devices/@{pci}/config r,

  @{PROC}/devices r,

  include if exists <local/nvidia-settings>
}

# vim:syntax=apparmor
