dotfiles/hosts/Arendia/default.nix

138 lines
4.5 KiB
Nix
Raw Normal View History

2024-11-04 23:50:38 +01:00
{ pkgs, lib, inputs, config, nixos-06cb-009a-fingerprint-sensor, ... }:
2024-11-04 21:45:47 +01:00
let
serverIP = "10.0.0.1";
in {
imports = [
(import ../Common/default.nix { inherit inputs pkgs config; })
(import ../Common/desktop.nix { inherit inputs pkgs config; })
(import ../Common/nfs.nix { inherit pkgs serverIP; })
(import ../Common/zfs.nix {inherit inputs pkgs config; })
2024-11-24 21:08:34 +01:00
(import ../Common/android.nix {inherit inputs pkgs config; })
2024-11-04 21:45:47 +01:00
];
hardware.graphics.extraPackages = [
pkgs.intel-compute-runtime
pkgs.intel-media-driver
];
2024-11-20 14:02:43 +01:00
# boot.kernelPackages = pkgs.linuxPackages_latest;
programs.steam = {
enable = true;
gamescopeSession.enable = true;
};
2024-11-04 21:45:47 +01:00
zramSwap.enable = true;
services.upower.enable = true;
2024-11-12 23:23:34 +01:00
services.thermald.enable = true;
2024-11-04 21:45:47 +01:00
services.logind.extraConfig = ''HandlePowerKey=ignore'';
2024-11-06 01:36:31 +01:00
services.throttled = {
enable = true;
2024-11-20 14:02:43 +01:00
# extraConfig = ''
# [GENERAL]
# Enabled: True
# Sysfs_Power_Path: /sys/class/power_supply/AC*/online
# Autoreload: False
#
# [BATTERY]
# Update_Rate_s: 30
#
# ## Settings to apply while connected to AC power
# [AC]
# Update_Rate_s: 5
#
# [UNDERVOLT]
# CORE: -105
# GPU: -85
# CACHE: -105
# UNCORE: -85
# ANALOGIO: 0
# '';
2024-11-06 01:36:31 +01:00
};
2024-11-04 21:45:47 +01:00
networking.hostId = "b6c5c9af";
networking.interfaces.wlan0.useDHCP = lib.mkDefault false;
networking.wireless.iwd.enable = true;
networking.wireless.iwd.settings = {
IPv6 = {
Enabled = true;
};
Settings = {
AutoConnect = true;
};
General = {
EnableNetworkConfiguration = true;
};
};
2024-11-06 01:36:31 +01:00
services.fprintd = {
enable = true;
2024-11-12 23:23:34 +01:00
tod = {
enable = true;
driver = nixos-06cb-009a-fingerprint-sensor.lib.libfprint-2-tod1-vfs0090-bingch {
calib-data-file = ./files/calib-data.bin;
};
};
2024-11-06 01:36:31 +01:00
};
2024-11-04 21:45:47 +01:00
# virtualisation
virtualisation.libvirtd.enable = true;
virtualisation.libvirtd.qemu.ovmf.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
programs.virt-manager.enable = true;
users.users.user.extraGroups = [ "libvirtd" ];
services.tlp = {
enable = true;
settings = {
2024-11-20 14:02:43 +01:00
# 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";
2024-11-04 21:45:47 +01:00
2024-11-20 14:02:43 +01:00
# CPU_MIN_PERF_ON_AC = 0;
# CPU_MAX_PERF_ON_AC = 100;
# CPU_MIN_PERF_ON_BAT = 0;
# CPU_MAX_PERF_ON_BAT = 100;
2024-11-04 21:45:47 +01:00
#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-11-06 01:36:31 +01:00
START_CHARGE_THRESH_BAT1 = 40; # 40 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT1 = 80; # 80 and above it stops charging
2024-11-04 21:45:47 +01:00
};
};
networking.wg-quick.interfaces = {
Tunnel = {
address = [ "10.0.0.7/24" "2a02:a03f:83ad:2101::7/128" ];
privateKeyFile = "/home/user/.secrets/Wireguard/Arendia.key";
listenPort = 51820;
autostart = false;
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.7/24" "2a02:a03f:83ad:2101::7/128" ];
privateKeyFile = "/home/user/.secrets/Wireguard/Arendia.key";
listenPort = 51820;
autostart = true;
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;
}];
};
};
}