diff --git a/lib/tests/release.nix b/lib/tests/release.nix index d83c15c511fa..30712735d237 100644 --- a/lib/tests/release.nix +++ b/lib/tests/release.nix @@ -1,6 +1,7 @@ { # The pkgs used for dependencies for the testing itself # Don't test properties of pkgs.lib, but rather the lib in the parent directory - pkgs ? import ../.. {} // { lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!"; }, + system ? builtins.currentSystem, + pkgs ? import ../.. { inherit system; } // { lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!"; }, # For testing someone may edit impure.nix to return cross pkgs, use `pkgsBuildBuild` directly so everything here works. pkgsBB ? pkgs.pkgsBuildBuild, nix ? pkgs-nixVersions.stable, diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 23b0e5213116..824387d1b9ca 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -19566,6 +19566,12 @@ githubId = 61306; name = "Rene Treffer"; }; + RTUnreal = { + email = "unreal+nixpkgs@rtinf.net"; + github = "RTUnreal"; + githubId = 22859658; + name = "RTUnreal"; + }; rubenhoenle = { email = "git@hoenle.xyz"; github = "rubenhoenle"; diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index 4e9835555103..b35dc0289e5d 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -177,6 +177,9 @@ | virtualBoxOVA | virtualbox-vagrant.box | nixos-image-vagrant-virtualbox-25.05pre-git-x86_64-linux.ova | | vmwareImage | nixos-25.05pre-git-x86_64-linux.vmdk | nixos-image-vmware-25.05pre-git-x86_64-linux.vmdk | +- `security.apparmor.policies..enforce` and `security.apparmor.policies..enable` were removed. + Configuring the state of apparmor policies must now be done using `security.apparmor.policies..state` tristate option. + - the notmuch vim plugin now lives in a separate output of the `notmuch` package. Installing `notmuch` will not bring the notmuch vim package anymore, add `vimPlugins.notmuch-vim` to your (Neo)vim configuration if you want the diff --git a/nixos/modules/security/apparmor.nix b/nixos/modules/security/apparmor.nix index e463e48f675e..a4c2f9e29fc3 100644 --- a/nixos/modules/security/apparmor.nix +++ b/nixos/modules/security/apparmor.nix @@ -1,20 +1,34 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let - inherit (builtins) attrNames head map match readFile; inherit (lib) types; inherit (config.environment) etc; cfg = config.security.apparmor; - mkDisableOption = name: lib.mkEnableOption name // { - default = true; - example = false; - }; - enabledPolicies = lib.filterAttrs (n: p: p.enable) cfg.policies; + enabledPolicies = lib.filterAttrs (n: p: p.state != "disable") cfg.policies; + buildPolicyPath = n: p: lib.defaultTo (pkgs.writeText n p.profile) p.path; + + # Accessing submodule options when not defined results in an error thunk rather than a regular option object + # We can emulate the behavior of `