added common environment file, fixed sudo issue

This commit is contained in:
2025-06-27 00:05:10 -04:00
parent fefa6dd3de
commit 30a72d9e74
5 changed files with 43 additions and 34 deletions

View File

@ -5,6 +5,7 @@
}: { }: {
imports = [ imports = [
./core.nix ./core.nix
./environment.nix
./fonts.nix ./fonts.nix
./users.nix ./users.nix
]; ];

View 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";
}

View File

@ -5,10 +5,6 @@
hostname, hostname,
... ...
} @ args: { } @ args: {
imports = [
../security/sudo.nix
];
networking.hostName = hostname; networking.hostName = hostname;
# Don't forget to set a password with passwd! # 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 = {}; users.groups.wyatt = {};

View File

@ -46,25 +46,17 @@ in {
# Install packages to be installed system-wide # Install packages to be installed system-wide
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim
neovim
git
wireguard-tools wireguard-tools
grim grim
slurp slurp
playerctl playerctl
light light
brightnessctl brightnessctl
firefox
wttrbar wttrbar
cliphist cliphist
patchelf xdg-desktop-portal-gtk
nix-ld
]; ];
# Set the EDITOR global environment variable to neovim
environment.variables.EDITOR = "nvim";
# Enable OpenSSH # Enable OpenSSH
services.openssh.enable = true; services.openssh.enable = true;
@ -160,14 +152,14 @@ in {
xdg = { xdg = {
portal = { portal = {
enable = true; enable = true;
wlr.enable = true; # wlr.enable = true;
config = { # config = {
common = { # common = {
default = [ # default = [
"wlr" # "wlr"
]; # ];
}; # };
}; # };
xdgOpenUsePortal = true; xdgOpenUsePortal = true;
extraPortals = with pkgs; [ extraPortals = with pkgs; [
xdg-desktop-portal-wlr xdg-desktop-portal-wlr

View File

@ -27,18 +27,6 @@
# Set your timezone # Set your timezone
time.timeZone = "America/Detroit"; time.timeZone = "America/Detroit";
# Install packages to be installed system-wide
environment.systemPackages = with pkgs; [
vim
neovim
git
patchelf
nix-ld
];
# Set the EDITOR global environment variable to neovim
environment.variables.EDITOR = "nvim";
# Enable OpenSSH # Enable OpenSSH
services.openssh.enable = true; services.openssh.enable = true;