dotfiles/hosts/Aloria/default.nix

95 lines
3.1 KiB
Nix
Raw Normal View History

2024-10-23 12:34:35 +02:00
{ pkgs, lib, inputs, config, ... }:
2024-09-22 16:27:43 +02:00
let
serverIP = "10.0.0.1";
in {
2024-09-13 10:46:49 +02:00
imports = [
(import ../Common/default.nix { inherit inputs pkgs config; })
(import ../Common/nvidia.nix { inherit inputs pkgs config; })
(import ../Common/desktop.nix { inherit inputs pkgs config; })
2024-09-22 16:27:43 +02:00
(import ../Common/nfs.nix { inherit pkgs serverIP; })
2024-09-13 10:46:49 +02:00
];
2024-10-06 18:01:46 +02:00
2024-09-13 10:46:49 +02:00
hardware.graphics.extraPackages = [
pkgs.intel-compute-runtime
pkgs.intel-media-driver
];
2024-06-07 01:01:14 +02:00
2024-09-13 10:46:49 +02:00
zramSwap.enable = true;
2024-10-06 18:01:46 +02:00
services.upower.enable = true;
2024-09-13 10:46:49 +02:00
services.logind.extraConfig = ''HandlePowerKey=ignore'';
2024-10-23 12:34:35 +02:00
networking.interfaces.wlan0.useDHCP = lib.mkDefault false;
2024-10-06 18:01:46 +02:00
networking.wireless.iwd.enable = true;
networking.wireless.iwd.settings = {
IPv6 = {
Enabled = true;
};
Settings = {
AutoConnect = true;
};
2024-10-23 12:34:35 +02:00
General = {
EnableNetworkConfiguration = true;
};
2024-10-06 18:01:46 +02:00
};
2024-09-13 23:34:58 +02:00
2024-10-06 18:01:46 +02:00
# virtualisation
2024-09-13 23:34:58 +02:00
virtualisation.libvirtd.enable = true;
virtualisation.libvirtd.qemu.ovmf.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
programs.virt-manager.enable = true;
users.users.user.extraGroups = [ "libvirtd" ];
2024-07-17 14:21:03 +02:00
2024-10-06 18:01:46 +02:00
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 20;
#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
2024-09-13 10:46:49 +02:00
networking.wg-quick.interfaces = {
Tunnel = {
address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ];
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
listenPort = 51820;
2024-10-22 17:07:46 +02:00
autostart = false;
2024-09-13 10:46:49 +02:00
postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;";
dns = ["10.0.0.1"];
peers = [{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "0.0.0.0/0" "::/0" ];
endpoint = "h.thomasave.be:13231";
persistentKeepalive = 25;
}];
};
OPNsense = {
address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ];
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
listenPort = 51820;
2024-10-22 17:07:46 +02:00
autostart = true;
2024-09-13 10:46:49 +02:00
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
dns = ["10.0.0.1"];
peers = [{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ];
endpoint = "h.thomasave.be:13231";
persistentKeepalive = 25;
}];
};
2024-07-17 14:21:03 +02:00
};
2024-06-04 22:13:24 +02:00
}