diff --git a/system/security/doas.nix b/system/security/doas.nix index ade34e34..56fec851 100644 --- a/system/security/doas.nix +++ b/system/security/doas.nix @@ -12,8 +12,21 @@ } { users = [ "${userSettings.username}" ]; - cmd = "tee"; + cmd = "nix"; noPass = true; + keepEnv = true; + } + { + users = [ "${userSettings.username}" ]; + cmd = "nixos-rebuild"; + noPass = true; + keepEnv = true; + } + { + users = [ "${userSettings.username}" ]; + cmd = "nix-collect-garbage"; + noPass = true; + keepEnv = true; } ]; diff --git a/user/app/emacs/init.el b/user/app/emacs/init.el index 7a321423..62589dc3 100644 --- a/user/app/emacs/init.el +++ b/user/app/emacs/init.el @@ -247,7 +247,9 @@ (require 'sudo-edit) (setq sudo-edit-local-method "doas") -(setq auth-source-save-behavior nil) +(setq auth-sources '("~/.authinfo.gpg")) +(setq auth-source-save-behavior "ask") +(sudo-edit-indicator-mode) (evil-define-key 'normal 'global (kbd "fU") 'sudo-edit) (evil-define-key 'normal 'global (kbd "fu") 'sudo-edit-find-file)