2024-11-11 22:37:24 -06:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
|
|
imports =
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
# <nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix>
|
|
|
|
./hardware-configuration.nix
|
|
|
|
./kathe.nix
|
|
|
|
./smb.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
|
|
|
boot.loader.grub.enable = false;
|
|
|
|
# Enables the generation of /boot/extlinux/extlinux.conf
|
|
|
|
boot.loader.generic-extlinux-compatible.enable = true;
|
|
|
|
|
|
|
|
networking.hostName = "bigbird"; # Define your hostname.
|
|
|
|
|
|
|
|
# Enable ZFS: https://openzfs.github.io/openzfs-docs/Getting%20Started/NixOS/index.html
|
|
|
|
boot.supportedFilesystems = [ "zfs" ];
|
|
|
|
boot.zfs.forceImportRoot = false;
|
|
|
|
boot.zfs.extraPools = [ "nas" ];
|
|
|
|
|
2024-11-12 01:05:36 -06:00
|
|
|
services.zfs.autoScrub.enable = true; # Current scan takes ~12h, runs monthly (I spend 2% of the time doing scans? lol)
|
|
|
|
|
2024-11-11 22:37:24 -06:00
|
|
|
networking.hostId = "66abd088"; # `openssl rand -hex 4`
|
|
|
|
|
|
|
|
time.timeZone = "America/Chicago";
|
|
|
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
vim
|
|
|
|
rsync
|
|
|
|
];
|
|
|
|
|
|
|
|
services.openssh.enable = true;
|
|
|
|
services.openssh.settings.PasswordAuthentication = false;
|
|
|
|
users.users.root.openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEhPyyqS3BGYor3zLbjc8hZuhem3mS8TNmvWogXcnz/b chandler@chandlerswift.com'' ];
|
|
|
|
|
2024-11-20 08:16:57 -06:00
|
|
|
services.prometheus.exporters = {
|
|
|
|
node = {
|
|
|
|
enable = true;
|
|
|
|
enabledCollectors = [
|
|
|
|
"systemd"
|
|
|
|
"zfs"
|
|
|
|
];
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-11-11 22:37:24 -06:00
|
|
|
# Open ports in the firewall.
|
|
|
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
# Or disable the firewall altogether.
|
|
|
|
# networking.firewall.enable = false;
|
|
|
|
|
|
|
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
|
|
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|
|
|
#
|
|
|
|
# Most users should NEVER change this value after the initial install, for any reason,
|
|
|
|
# even if you've upgraded your system to a new NixOS release.
|
|
|
|
#
|
|
|
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|
|
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
|
|
|
# to actually do that.
|
|
|
|
#
|
|
|
|
# This value being lower than the current NixOS release does NOT mean your system is
|
|
|
|
# out of date, out of support, or vulnerable.
|
|
|
|
#
|
|
|
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|
|
|
# and migrated your data accordingly.
|
|
|
|
#
|
|
|
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
|
|
system.stateVersion = "24.05"; # Did you read the comment?
|
|
|
|
}
|