bulk of the refactor

This commit is contained in:
2025-08-27 11:31:06 -04:00
parent 6ff4e13b03
commit ddd3fb39e4
2 changed files with 32 additions and 32 deletions

View File

@@ -6,14 +6,19 @@
neovim neovim
usbutils usbutils
coreutils coreutils
lshw
systemd
dmidecode
pciutils pciutils
nix-ld
patchelf patchelf
htop htop
]; ] ++
lib.optionals pkgs.stdenv.isLinux (with pkgs; [
systemd
lshw
dmidecode
nix-ld
]) ++
lib.optionals pkgs.stdenv.isDarwin (with pkgs; [
# nothing here, yet
]);
# Common environment variables that every system will use # Common environment variables that every system will use
environment.variables.EDITOR = "nvim"; environment.variables.EDITOR = "nvim";

View File

@@ -1,30 +1,23 @@
{ lib, pkgs, userName, hostname, ... }:
{ {
lib,
pkgs,
userName,
hostname,
...
} @ args: {
networking.hostName = hostname; networking.hostName = hostname;
# Don't forget to set a password with passwd! users.users."${userName}" = {
users.users."${userName}" = lib.mkMerge [ home = if pkgs.stdenv.isDarwin
{ then "/Users/${userName}"
home = else "/home/${userName}";
if pkgs.stdenv.isDarwin description = userName;
then "/Users/${userName}" } // lib.optionalAttrs pkgs.stdenv.isLinux {
else "/home/${userName}"; group = "${userName}";
description = userName; isNormalUser = true;
} };
(lib.mkIf (pkgs.stdenv.isLinux) { users.groups.wyatt = {};
group = "${userName}"; nix.settings.trusted-users = [userName];
isNormalUser = true;
})
];
security.sudo = { security = lib.optionalAttrs pkgs.stdenv.isLinux {
extraRules = [ sudo.extraRules = [
{ {
groups = [ "wheel" ]; groups = [ "wheel" ];
commands = [ commands = [
@@ -37,7 +30,9 @@
]; ];
}; };
users.groups.wyatt = {}; environment = lib.optionalAttrs pkgs.stdenv.isDarwin {
etc."sudoers.d/wheel-nopasswd".text = ''
nix.settings.trusted-users = [userName]; %wheel ALL=(ALL:ALL) NOPASSWD: SETENV: ALL
'';
};
} }