nixos-servers/hosts/ns1/configuration.nix

65 lines
1.3 KiB
Nix
Raw Normal View History

2024-12-05 17:35:06 +00:00
{
config,
lib,
pkgs,
...
}:
2024-03-13 22:22:10 +00:00
{
2024-12-05 17:35:06 +00:00
imports = [
../template/hardware-configuration.nix
2024-03-13 22:22:10 +00:00
2024-12-05 17:35:06 +00:00
../../system
../../services/ns/master-authorative.nix
../../services/ns/resolver.nix
../../common/vm
];
2024-03-13 22:22:10 +00:00
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
networking.hostName = "ns1";
networking.domain = "home.2rjus.net";
networking.useNetworkd = true;
networking.useDHCP = false;
services.resolved.enable = false;
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.5/24"
];
routes = [
2024-12-01 01:00:57 +00:00
{ Gateway = "10.69.13.1"; }
2024-03-13 22:22:10 +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-03-13 22:40:17 +00:00
nix.settings.tarball-ttl = 0;
2024-03-13 22:22:10 +00:00
environment.systemPackages = with pkgs; [
vim
wget
git
];
# 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?
}