2024-12-26 13:45:16 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
2024-12-18 21:54:04 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
imports =
|
2024-12-26 13:45:16 +00:00
|
|
|
[
|
2024-12-18 21:54:04 +00:00
|
|
|
./hardware-configuration.nix
|
2024-12-26 13:45:16 +00:00
|
|
|
./network-configuration.nix
|
|
|
|
/var/src/modules/nixin-base.nix
|
2024-12-19 14:52:34 +00:00
|
|
|
/var/src/modules/users.nix
|
2024-12-19 17:22:19 +00:00
|
|
|
/var/src/modules/wireguard-client.nix
|
2024-12-18 21:54:04 +00:00
|
|
|
];
|
|
|
|
|
2024-12-26 13:45:16 +00:00
|
|
|
# Bootloader.
|
2024-12-18 21:54:04 +00:00
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
2024-12-26 13:45:16 +00:00
|
|
|
# Enable ip forwarding to route packets
|
|
|
|
boot.kernel.sysctl = {
|
|
|
|
"net.ipv4.ip_forward" = 1;
|
|
|
|
"net.ipv6.conf.all.forwarding" = 1;
|
2024-12-18 21:54:04 +00:00
|
|
|
};
|
|
|
|
|
2024-12-19 17:22:19 +00:00
|
|
|
nixin.wg.client = {
|
2024-12-26 13:45:16 +00:00
|
|
|
ipv4 = "192.168.12.11/32";
|
|
|
|
ipv6 = "2a01:4f9:1a:9a05::11/128";
|
|
|
|
allowedIPs = [ "192.168.12.0/24" "2a01:4f9:1a:9a05::/64" ];
|
|
|
|
endpoint = "vpn.lab12.fr:51812";
|
|
|
|
endpointKey = "cUmp55I20JEhxr+RMmOsX+6U9kcDiAq3grnvzjQ642w=";
|
2024-12-18 21:54:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Open ports in the firewall.
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 144 443 ];
|
2024-12-26 13:45:16 +00:00
|
|
|
#networking.firewall.allowedUDPPorts = [ 53 ];
|
|
|
|
# allow UDP port range for mosh
|
|
|
|
networking.firewall.allowedUDPPortRanges = [
|
|
|
|
{ from = 60000; to = 61000; }
|
|
|
|
];
|
2024-12-18 21:54:04 +00:00
|
|
|
# Or disable the firewall altogether.
|
|
|
|
# networking.firewall.enable = false;
|
|
|
|
|
2024-12-26 13:45:16 +00:00
|
|
|
# Configure console keymap
|
|
|
|
# console.keyMap = "fr";
|
2024-12-18 21:54:04 +00:00
|
|
|
|
2024-12-26 13:45:16 +00:00
|
|
|
# Allow unfree packages
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
mtr
|
|
|
|
memtester
|
|
|
|
];
|
2024-12-18 21:54:04 +00:00
|
|
|
|
2024-12-26 13:45:16 +00:00
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
# on your system were taken. It's perfectly fine and recommended to leave
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
system.stateVersion = "24.05"; # Did you read the comment?
|
|
|
|
}
|