nixos-conf/machine-confs/helium.nix

94 lines
2.1 KiB
Nix
Raw Normal View History

2024-07-20 17:35:00 +03:00
{ config, pkgs, ... }:
2024-05-23 13:39:48 +03:00
{
2024-06-02 05:53:39 +03:00
networking = {
hostName = "helium";
2024-06-02 16:18:19 +03:00
firewall.allowedUDPPorts = [
51820
51821
];
2024-06-02 05:53:39 +03:00
wg-quick.interfaces = {
wg0 = {
2024-07-31 00:12:07 +03:00
autostart = true;
2024-06-02 05:53:39 +03:00
address = [ "172.16.0.2/24" ];
2024-06-02 16:18:19 +03:00
dns = [
"192.168.0.1"
"vsinerva.fi"
];
2024-06-02 05:53:39 +03:00
privateKeyFile = "/root/wireguard-keys/privatekey-home";
listenPort = 51820;
2024-05-23 13:39:48 +03:00
2024-06-02 05:53:39 +03:00
peers = [
{
publicKey = "f9QoYPxyaxylUcOI9cE9fE9DJoEX4c6GUtr4p+rsd34=";
allowedIPs = [ "0.0.0.0/0" ];
endpoint = "wg.vsinerva.fi:51820";
}
];
};
wg1 = {
autostart = false;
address = [ "10.100.0.7/24" ];
dns = [ "1.1.1.1" ];
privateKeyFile = "/root/wireguard-keys/privatekey-netflix";
listenPort = 51821;
2024-05-23 13:39:48 +03:00
2024-06-02 05:53:39 +03:00
peers = [
{
publicKey = "XSYHg0utIR1j7kRsWFwuWNo4RPD47KP53cVa6qDPtRE=";
2024-06-02 16:18:19 +03:00
allowedIPs = [
"0.0.0.0/0"
"192.168.0.0/24"
];
2024-06-02 05:53:39 +03:00
endpoint = "netflix.vsinerva.fi:51821";
}
];
};
};
};
2024-05-23 13:39:48 +03:00
2024-06-02 05:53:39 +03:00
nix.settings = {
cores = 3;
max-jobs = 4;
};
2024-05-23 13:39:48 +03:00
services.openssh.enable = pkgs.lib.mkForce false;
services.fail2ban.enable = pkgs.lib.mkForce false;
2024-06-02 05:53:39 +03:00
imports = [
../base.nix
2024-06-06 16:53:15 +03:00
../users/vili.nix
2024-06-02 05:53:39 +03:00
../desktop.nix
../development.nix
../services/syncthing.nix
../services/redshift.nix
../services/game-streaming.nix
../hardware-specific/keychron-q11.nix
../hardware-specific/trackball.nix
../hardware-specific/amd-laptop.nix
../hardware-specific/usb-automount.nix
2024-06-02 05:53:39 +03:00
];
2024-05-23 13:39:48 +03:00
services.xserver.displayManager.setupCommands = ''
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-0 --auto --pos 0x0 --primary --output eDP --auto --pos 3840x360
'';
2024-05-23 13:39:48 +03:00
boot = {
resumeDevice = "/dev/mapper/luks-f6e1979b-0dee-4ee9-8170-10490019854b";
kernelParams = [ "resume_offset=44537856" ];
2024-06-02 16:18:19 +03:00
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
2024-06-02 05:53:39 +03:00
};
2024-06-02 16:18:19 +03:00
};
2024-05-23 13:39:48 +03:00
2024-06-02 16:18:19 +03:00
swapDevices = [
{
device = "/var/lib/swapfile";
size = 16 * 1024;
}
];
2024-05-23 13:39:48 +03:00
}