mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-18 22:55:52 +05:30
quick sudoedit files with nvim
This commit is contained in:
parent
126a2076cc
commit
162f04a090
|
@ -4,11 +4,18 @@
|
||||||
# Doas instead of sudo
|
# Doas instead of sudo
|
||||||
security.doas.enable = true;
|
security.doas.enable = true;
|
||||||
security.sudo.enable = false;
|
security.sudo.enable = false;
|
||||||
security.doas.extraRules = [{
|
security.doas.extraRules = [
|
||||||
users = [ "${userSettings.username}" ];
|
{
|
||||||
keepEnv = true;
|
users = [ "${userSettings.username}" ];
|
||||||
persist = true;
|
keepEnv = true;
|
||||||
}];
|
persist = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
users = [ "${userSettings.username}" ];
|
||||||
|
cmd = "tee";
|
||||||
|
noPass = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.writeScriptBin "sudo" ''exec doas "$@"'')
|
(pkgs.writeScriptBin "sudo" ''exec doas "$@"'')
|
||||||
|
|
|
@ -15,6 +15,8 @@ if vim.g.neovide then
|
||||||
vim.g.neovide_cursor_vfx_mode = "pixiedust"
|
vim.g.neovide_cursor_vfx_mode = "pixiedust"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command('W', 'execute "silent! write !sudo tee % >/dev/null" <bar> edit', { nargs = 0})
|
||||||
|
|
||||||
vim.g.neovide_scale_factor = 1.0
|
vim.g.neovide_scale_factor = 1.0
|
||||||
|
|
||||||
-- bootstrap lazy and all plugins
|
-- bootstrap lazy and all plugins
|
||||||
|
|
Loading…
Reference in a new issue