{ config, pkgs, ... }: { imports = [ ./hardware-configuration.nix ]; networking.firewall.allowedTCPPorts = [ 5000 ]; boot.kernelPackages = pkgs.linuxKernel.packageAliases.linux_latest; hardware.graphics.enable32Bit = true; hardware.bluetooth.enable = true; services.blueman.enable = true; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "ilex"; time.timeZone = "Europe/Amsterdam"; networking = { networkmanager.enable = true; useDHCP = false; interfaces = { enp1s0f0.useDHCP = true; }; }; system.stateVersion = "22.11"; services.postgresql = { enable = true; ensureDatabases = [ "tracktrain" "glitchtrip" "crstracker" "travelynx" "bookwyrm" ]; ensureUsers = [ { name = "tracktrain"; ensureDBOwnership = true; } { name = "travelynx"; ensureDBOwnership = true; } { name = "glitchtrip"; ensureDBOwnership = true; } { name = "bookwyrm"; ensureDBOwnership = true; } { name = "crstracker"; ensureDBOwnership = true; } ]; authentication = '' local all all trust host all all 127.0.0.1/32 trust host all all ::1/127 trust ''; extensions = ps: [ ps.postgis ]; }; # services.redis.servers."bookwyrm" = { # enable = true; # port = 6379; # }; services.tlp = { enable = true; settings = { START_CHARGE_THRESH_BAT0 = 75; STOP_CHARGE_THRESH_BAT0 = 80; PLATFORM_PROFILE_ON_AC = "performance"; PLATFORM_PROFILE_ON_BAT = "low-power"; CPU_SCALING_GOVERNOR_ON_AC = "performance"; CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; DEVICES_TO_ENABLE_ON_STARTUP = "wifi"; DEVICES_TO_DISABLE_ON_STARTUP = "bluetooth wwan"; DEVICES_TO_DISABLE_ON_LAN_CONNECT = "wifi"; DEVICES_TO_ENABLE_ON_LAN_DISCONNECT = "wifi"; WIFI_PWR_ON_AC = "off"; WIFI_PWR_ON_BAT = "on"; USB_AUTOSUSPEND = 1; USB_EXCLUDE_AUDIO = 1; }; }; }