Files
nixos/hosts/baseline.nix
T

144 lines
2.5 KiB
Nix
Raw Normal View History

2025-06-10 14:28:46 -05:00
{
config,
lib,
2025-12-26 23:05:37 -06:00
metadata,
2025-06-10 14:28:46 -05:00
pkgs,
...
}:
{
imports = [
2025-06-10 15:05:09 -05:00
../modules/nix-conf.nix
2025-06-10 14:28:46 -05:00
];
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
environment.systemPackages = with pkgs; [
agenix
bitwarden-cli
bmon
btop
btrfs-progs
coreutils-full
diffutils
efibootmgr
findutils
file
2025-09-27 17:53:39 -05:00
gcc-tune
2025-06-10 14:28:46 -05:00
git
gnupatch
hms # My own home manager switcher
iperf
killall
nano
lshw
pciutils
psmisc
pwgen
unzip
usbutils
wget
xfsprogs
];
i18n.defaultLocale = "en_US.UTF-8";
nix = {
gc.dates = "weekly";
settings.auto-optimise-store = true;
};
# Network Manager pulls in too many deps
networking = {
search = [
"thehellings.lan"
"home"
];
networkmanager.enable = false;
};
programs = {
2025-12-02 15:05:46 -06:00
gnupg.agent.enable = true;
2025-06-10 14:28:46 -05:00
xonsh = {
enable = true;
};
ssh = {
2025-12-26 23:05:37 -06:00
knownHosts = builtins.mapAttrs (n: v: {
extraHostNames = [
"${n}.thehellings.lan"
"${n}.shire-zebra.ts.net"
];
publicKey = v.pubkey;
}) (lib.filterAttrs (_: v: v ? "pubkey") metadata.hosts);
2025-06-10 14:28:46 -05:00
};
};
# Enable the OpenSSH daemon for remote control
services = {
2025-07-02 11:55:35 -05:00
locate.enable = true;
2025-06-10 14:28:46 -05:00
openssh = {
enable = true;
settings.X11Forwarding = true;
};
2025-11-20 23:08:52 -06:00
prometheus.exporters = {
node = {
enable = true;
2025-12-02 15:05:46 -06:00
enabledCollectors = [
"ethtool"
"logind"
"mountstats"
"systemd"
"tcpstat"
];
2025-11-20 23:08:52 -06:00
};
ping = {
enable = true;
settings = {
ping = {
interval = "10s";
timeout = "5s";
};
2025-12-02 15:05:46 -06:00
targets = [
"thehellings.com"
"genesis.shire-zebra.ts.net"
"www.google.com"
];
2025-11-20 23:08:52 -06:00
};
};
systemd.enable = true;
2025-11-19 22:43:10 -06:00
};
2025-06-10 14:28:46 -05:00
};
security.sudo.extraRules = [
{
users = [ "greg" ];
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
}
];
# Define a user account. Don't forget to set a password with passwd.
users.users.greg = {
isNormalUser = true;
createHome = true;
extraGroups = [
"wheel"
]; # Enable sudo for the user.
shell = config.programs.xonsh.package;
initialPassword = "password";
openssh.authorizedKeys.keys = lib.strings.splitString "\n" (
2025-06-10 21:48:12 -05:00
builtins.readFile ../home/ssh/authorized_keys
2025-06-10 14:28:46 -05:00
);
};
system.stateVersion = "24.11";
}