added common environment file, fixed sudo issue
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
}: {
|
||||
imports = [
|
||||
./core.nix
|
||||
./environment.nix
|
||||
./fonts.nix
|
||||
./users.nix
|
||||
];
|
||||
|
20
modules/common/environment.nix
Normal file
20
modules/common/environment.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ lib, pkgs, ... }: {
|
||||
# Common packages that every system will use
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
vim
|
||||
neovim
|
||||
usbutils
|
||||
coreutils
|
||||
lshw
|
||||
systemd
|
||||
dmidecode
|
||||
pciutils
|
||||
nix-ld
|
||||
patchelf
|
||||
htop
|
||||
];
|
||||
|
||||
# Common environment variables that every system will use
|
||||
environment.variables.EDITOR = "nvim";
|
||||
}
|
@ -5,10 +5,6 @@
|
||||
hostname,
|
||||
...
|
||||
} @ args: {
|
||||
imports = [
|
||||
../security/sudo.nix
|
||||
];
|
||||
|
||||
networking.hostName = hostname;
|
||||
|
||||
# Don't forget to set a password with ‘passwd’!
|
||||
@ -27,7 +23,19 @@
|
||||
})
|
||||
];
|
||||
|
||||
security.sudo.needsPassword = false;
|
||||
security.sudo = {
|
||||
extraRules = [
|
||||
{
|
||||
groups = [ "wheel" ];
|
||||
commands = [
|
||||
{
|
||||
command = "ALL";
|
||||
options = [ "NOPASSWD" "SETENV" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
users.groups.wyatt = {};
|
||||
|
||||
|
Reference in New Issue
Block a user