I am setting up my system and have made a security.nix config file, with a bunch of stuff.
When enabling Apparmor there, SDDM does not launch anymore, instead I get into TTY.
### AppArmor
security.apparmor.enable = true;
# kill processes not confined with Apparmor, when a profile exists
# security.apparmor.killUnconfinedConfinables = true;
# mediation with dbus when not found
services.dbus.apparmor = "required";
Is SDDM ran as a sddm user or as root? This might be an issue and the former would be the recommended way. Not sure if this works as there is no sddm user declared in my config?
I will get logs and more tomorrow.
It might be the “kill unconfined confinables”? But this should be set I think.
Depending on how big of an issue this (mandatory access control of some flavour) is you might want to run a different distro until support is further along. You can follow work on apparmor over in this thread: AppArmor on NixOS Roadmap
Thanks! This is pretty crazy, as all major distros have SELinux or AppArmor setup.
I know that Fedoras rules for SELinux for example are not really strong, and all the user processes are completely unconfined. So the use of that MAC for a typical desktop system is pretty small.
Current sandboxing techniques like Flatpak (bubblewrap), bubblejail (not on nixpkgs yet) and others (fortify, minijail, go-judge, …) can be good as well.
I run apparmor and sddm together just fine. However, i only set services.dbus.apparmor = "enabled"; and run services.dbus.implementation = "broker";, not sure if this changes things.