62 lines
1.7 KiB
Nix
62 lines
1.7 KiB
Nix
{ config, pkgs, values, ... }:
|
|
{
|
|
imports = [
|
|
# Include the results of the hardware scan.
|
|
./hardware-configuration.nix
|
|
../../base.nix
|
|
../../misc/metrics-exporters.nix
|
|
|
|
./services/monitoring
|
|
./services/nginx
|
|
];
|
|
|
|
sops.defaultSopsFile = ../../secrets/ildkule/ildkule.yaml;
|
|
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
|
sops.age.generateKey = true;
|
|
|
|
boot.loader.grub.device = "/dev/vda";
|
|
boot.tmp.cleanOnBoot = true;
|
|
zramSwap.enable = true;
|
|
|
|
networking.hostName = "ildkule"; # Define your hostname.
|
|
|
|
# Main connection for incoming and outgoing connections to the world, using the global ("floating") IP
|
|
systemd.network.networks."30-ntnu-global" = values.defaultNetworkConfig // {
|
|
matchConfig.Name = "ens4";
|
|
DHCP = "yes";
|
|
gateway = [ ];
|
|
addresses = [
|
|
{
|
|
# Add the global address in addition to the local address learned from DHCP
|
|
addressConfig.Address = "129.241.153.213/32";
|
|
}
|
|
];
|
|
};
|
|
|
|
# Secondary connection only for use within the university network
|
|
systemd.network.networks."40-ntnu-internal" = values.defaultNetworkConfig // {
|
|
matchConfig.Name = "ens3";
|
|
DHCP = "yes";
|
|
gateway = [ ];
|
|
routes = [
|
|
{
|
|
routeConfig.Destination = "10.0.0.0/8";
|
|
}
|
|
];
|
|
linkConfig.RequiredForOnline = "no";
|
|
dhcpV4Config = {
|
|
# Do not use this interface as a default / global route
|
|
# Note: This does not remove the link-local route 192.168.11.0/24, as it is added by the kernel itself
|
|
UseRoutes = "no";
|
|
};
|
|
};
|
|
|
|
# List packages installed in system profile
|
|
environment.systemPackages = with pkgs; [
|
|
];
|
|
|
|
system.stateVersion = "23.11"; # Did you read the comment?
|
|
|
|
}
|