Files
nix/hosts/nixos/default.nix

77 lines
1.4 KiB
Nix

{
pkgs,
config,
lib,
inputs,
...
}: {
imports = [
inputs.autoaspm.nixosModules.default
];
# base system package install list
environment.systemPackages = with pkgs; [
wget
curl
rsync
git
age
fzf
neofetch
usbutils
pciutils
python3
vim
lf
btop
powertop
];
# set timezone
time.timeZone = "America/Chicago";
# allow proprietary packages
nixpkgs.config.allowUnfree = true;
# fix power buttons
services.logind.settings.Login = {
HandlePowerKey = "suspend";
HandleLidSwitch = "suspend";
#HibernateDelaySec = "30min";
};
# power management
services.autoaspm.enable = true;
powerManagement.powertop.enable = true;
# enable flakes
nix.settings.experimental-features = ["nix-command" "flakes"];
users.defaultUserShell = pkgs.zsh;
# passwordless rebuild
security.sudo.extraRules = [
{
users = ["blake"];
commands = [
{
command = "/run/current-system/sw/bin/nixos-rebuild";
options = ["NOPASSWD"];
}
{
command = "/run/current-system/sw/bin/systemctl";
options = ["NOPASSWD"];
}
{
command = "/run/current-system/sw/bin/journalctl";
options = ["NOPASSWD"];
}
{
command = "/run/current-system/sw/bin/tailscale";
options = ["NOPASSWD"];
}
];
}
];
}