1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 12:42:24 +00:00
nixpkgs/nixos/modules
ivanbrennan d08967a3a8
nixos/security.sudo: describe extraRules order
The order of sudoers entries is significant. The man page for sudoers(5)
notes:

  Where there are multiple matches, the last match is used (which is not
  necessarily the most specific match).

This module adds a rule for group "wheel" matching all commands. If you
wanted to add a more specific rule allowing members of the "wheel" group
to run command `foo` without a password, you'd need to use mkAfter to
ensure your rule comes after the more general rule.

  extraRules = lib.mkAfter [
    {
      groups = [ "wheel" ];
      commands = [
        {
          command = "${pkgs.foo}/bin/foo";
          options = [ "NOPASSWD" "SETENV" ];
        }
      ]
    }
  ];

Otherwise, when configuration options are merged, if the general rule
ends up after the specific rule, it will dictate the behavior even when
running the `foo` command.
2018-07-01 15:50:51 -04:00
..
config nixos/pulseaudio: pulseaudio.enable should imply sound.enable 2018-04-14 19:12:47 +01:00
hardware Merge branch 'master' into staging 2018-04-10 09:13:36 +02:00
i18n/input-method
installer nixos/iso-image.nix: Fix typo 2018-04-22 22:12:17 +03:00
misc Merge pull request #39048 from oxij/nixos/fix-rename-bugs 2018-04-22 17:46:09 +00:00
profiles Merge pull request #38114 from oxij/nixos/doc-module 2018-04-05 07:09:32 +00:00
programs nixos: enable bash command completion by default 2018-04-13 18:36:51 +02:00
security nixos/security.sudo: describe extraRules order 2018-07-01 15:50:51 -04:00
services wireguard service: use scripts instead of ExecStarts/Stops 2018-04-22 13:33:11 -05:00
system raspberrypi-bootloader: Adds firmwareConfig config option 2018-04-22 18:27:17 +03:00
tasks lxd: 2.16 -> 3.0.0 2018-04-14 11:02:24 +01:00
testing
virtualisation Merge pull request #35541 from xeji/containers-extraflags 2018-04-21 14:16:49 +01:00
module-list.nix Merge pull request #27958 from LumiGuide/strongswan-swanctl 2018-04-21 15:47:39 -05:00
rename.nix Merge pull request #39048 from oxij/nixos/fix-rename-bugs 2018-04-22 17:46:09 +00:00