nixos-servers/hosts/ha1/configuration.nix

78 lines
1.5 KiB
Nix
Raw Permalink Normal View History

2024-12-05 17:35:06 +00:00
{
config,
lib,
pkgs,
...
}:
2024-05-01 17:05:45 +00:00
{
2024-12-05 17:35:06 +00:00
imports = [
../template/hardware-configuration.nix
2024-05-01 17:05:45 +00:00
2024-12-05 17:35:06 +00:00
../../system
../../common/vm
];
2024-05-01 17:05:45 +00:00
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
2024-06-18 21:28:39 +00:00
boot.loader.grub = {
enable = true;
device = "/dev/sda";
configurationLimit = 3;
};
2024-05-01 17:05:45 +00:00
2024-05-01 17:14:27 +00:00
networking.hostName = "ha1";
2024-05-01 17:05:45 +00:00
networking.domain = "home.2rjus.net";
networking.useNetworkd = true;
networking.useDHCP = false;
2024-05-01 17:22:44 +00:00
services.resolved.enable = true;
2024-05-01 17:05:45 +00:00
networking.nameservers = [
"10.69.13.5"
"10.69.13.6"
];
systemd.network.enable = true;
systemd.network.networks."ens18" = {
matchConfig.Name = "ens18";
address = [
"10.69.13.9/24"
];
routes = [
2024-12-01 01:00:57 +00:00
{ Gateway = "10.69.13.1"; }
2024-05-01 17:05:45 +00:00
];
linkConfig.RequiredForOnline = "routable";
};
time.timeZone = "Europe/Oslo";
2024-12-05 17:35:06 +00:00
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
2024-05-01 17:05:45 +00:00
nix.settings.tarball-ttl = 0;
environment.systemPackages = with pkgs; [
vim
wget
git
];
2024-06-02 22:18:25 +00:00
# Backup service dirs
sops.secrets."backup_helper_secret" = { };
backup-helper = {
enable = true;
password-file = "/run/secrets/backup_helper_secret";
backup-dirs = [
"/var/lib/hass"
"/var/lib/zigbee2mqtt"
"/var/lib/mosquitto"
];
};
2024-05-01 17:05:45 +00:00
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
system.stateVersion = "23.11"; # Did you read the comment?
}