mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
shell.nix: split sudo/run0 to security.nix
fix run0 pam auth
This commit is contained in:
parent
4590349ac2
commit
0623dd11e1
2 changed files with 22 additions and 13 deletions
22
modules/security.nix
Normal file
22
modules/security.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
environment.shellAliases = {
|
||||||
|
sudo = "sudo ";
|
||||||
|
#make run0 use aliases
|
||||||
|
run0 = "run0 --background='' ";
|
||||||
|
s = "run0";
|
||||||
|
};
|
||||||
|
security = {
|
||||||
|
sudo = {
|
||||||
|
execWheelOnly = true;
|
||||||
|
extraConfig = ''
|
||||||
|
Defaults timestamp_timeout=1
|
||||||
|
Defaults env_keep += "EDITOR VISUAL PAGER SYSTEMD_PAGERSECURE MANPAGER"
|
||||||
|
Defaults lecture = never
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
pam.services.systemd-run0 = {
|
||||||
|
setEnvironment = true;
|
||||||
|
pamMount = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -18,10 +18,6 @@
|
||||||
MANPAGER = "page -t man";
|
MANPAGER = "page -t man";
|
||||||
};
|
};
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
sudo = "sudo ";
|
|
||||||
#make run0 use aliases
|
|
||||||
run0 = "run0 --background='' ";
|
|
||||||
s = "run0";
|
|
||||||
#paste link trick
|
#paste link trick
|
||||||
pastebin = "curl -F 'clbin=<-' https://clbin.com";
|
pastebin = "curl -F 'clbin=<-' https://clbin.com";
|
||||||
termbin = "nc termbin.com 9999";
|
termbin = "nc termbin.com 9999";
|
||||||
|
|
@ -45,15 +41,6 @@
|
||||||
interactiveShellInit = "fetch-rs";
|
interactiveShellInit = "fetch-rs";
|
||||||
};
|
};
|
||||||
|
|
||||||
security.sudo = {
|
|
||||||
execWheelOnly = true;
|
|
||||||
extraConfig = ''
|
|
||||||
Defaults timestamp_timeout=1
|
|
||||||
Defaults env_keep += "EDITOR VISUAL PAGER SYSTEMD_PAGERSECURE MANPAGER"
|
|
||||||
Defaults lecture = never
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
#zsh stuff
|
#zsh stuff
|
||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
programs = {
|
programs = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue