diff options
author | William Carroll <wpcarro@gmail.com> | 2020-08-16T18·06+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-08-20T10·26+0100 |
commit | 2bf3c6c9269b36f3078529a2f075645d59ddc56e (patch) | |
tree | 46e9d121496e51422ebf5df2eca7f571cbc52320 /nixos/socrates/configuration.nix | |
parent | 9a6d2c3343984103723990a574dbe651c992c06e (diff) |
Log all polkit actions to find action.id for nixos-rebuild
I would like to setup a polkit rule to allow `buildkite-agent` (i.e. a forthcoming user) to call `nixos-rebuild`. I need to know the `action.id` before I can write a reliable rule.
Diffstat (limited to 'nixos/socrates/configuration.nix')
-rw-r--r-- | nixos/socrates/configuration.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/socrates/configuration.nix b/nixos/socrates/configuration.nix index b9d2b23485bb..469e2f45dccc 100644 --- a/nixos/socrates/configuration.nix +++ b/nixos/socrates/configuration.nix @@ -163,6 +163,12 @@ in { # lid. services.logind.lidSwitch = "ignore"; + security.polkit.extraConfig = '' + polkit.addRule(function(action, subject) { + polkit.log("subject.user: " + subject.user + " is attempting action.id: " + action.id); + }); + ''; + # Provision SSL certificates to support HTTPS connections. security.acme.acceptTerms = true; security.acme.email = "wpcarro@gmail.com"; |