restructure hosts
This commit is contained in:
69
hosts/nixos/default.nix
Normal file
69
hosts/nixos/default.nix
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
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;
|
||||
|
||||
# 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"];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user