107 lines
2.5 KiB
Nix
107 lines
2.5 KiB
Nix
# Edit this configuration file to define what should be installed on
|
||
# your system. Help is available in the configuration.nix(5) man page
|
||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||
|
||
{ config, pkgs, ... }:
|
||
|
||
{
|
||
imports = [
|
||
./hardware-configuration-athena.nix
|
||
./server-partitioning.nix
|
||
./configuration-common.nix
|
||
];
|
||
nixpkgs.config.allowUnfree = true;
|
||
|
||
# Suggestions from llama to increase cpu bound efficency for ai models.
|
||
# Set CPU frequency to 3.5 GHz
|
||
|
||
nix = {
|
||
settings = {
|
||
experimental-features = [ "nix-command" "flakes" ];
|
||
trusted-users = [ "root" "th3r00t" ];
|
||
};
|
||
};
|
||
boot = {
|
||
kernelPackages = pkgs.linuxPackages_latest;
|
||
initrd.availableKernelModules = [
|
||
"xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"
|
||
];
|
||
kernelModules = [ "fuse" "cifs" ];
|
||
initrd.kernelModules = [ ];
|
||
loader.systemd-boot.enable = true;
|
||
loader.efi.canTouchEfiVariables = true;
|
||
kernelParams = [ "hz=35000000" ];
|
||
supportedFilesystems = [ "vfat" "btrfs" "cifs" ];
|
||
extraModulePackages = [ ];
|
||
extraModprobeConfig = ''
|
||
'';
|
||
};
|
||
networking = {
|
||
hostName = "Athena"; # Define your hostname.
|
||
firewall.enable = true;
|
||
firewall.allowedTCPPorts = [ 21 22 80 443 5900 8080 8384];
|
||
firewall.allowedUDPPorts = [ 21 22 80 443 5900 8080 8384];
|
||
};
|
||
time.timeZone = "America/New_York";
|
||
i18n = {
|
||
defaultLocale = "en_US.UTF-8";
|
||
extraLocaleSettings = {
|
||
LC_ADDRESS = "en_US.UTF-8";
|
||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||
LC_MEASUREMENT = "en_US.UTF-8";
|
||
LC_MONETARY = "en_US.UTF-8";
|
||
LC_NAME = "en_US.UTF-8";
|
||
LC_NUMERIC = "en_US.UTF-8";
|
||
LC_PAPER = "en_US.UTF-8";
|
||
LC_TELEPHONE = "en_US.UTF-8";
|
||
LC_TIME = "en_US.UTF-8";
|
||
};
|
||
};
|
||
|
||
fonts = {
|
||
enableDefaultPackages = true;
|
||
fontDir.enable = true;
|
||
packages = with pkgs; [
|
||
];
|
||
};
|
||
|
||
environment = {
|
||
variables.EDITOR = "nvim";
|
||
systemPackages = with pkgs; [
|
||
git
|
||
vim
|
||
curl
|
||
age
|
||
];
|
||
};
|
||
|
||
programs = {
|
||
mtr.enable = true;
|
||
gnupg.agent = {
|
||
enable = true;
|
||
enableSSHSupport = true;
|
||
};
|
||
};
|
||
|
||
services = {
|
||
pulseaudio.enable = false;
|
||
printing.enable = false;
|
||
openssh.enable = true;
|
||
ollama = {
|
||
enable = true;
|
||
loadModels = [
|
||
"steamdj/llama3.1-cpu-only"
|
||
# "qwen2.5:7b-instruct-q4_K_M"
|
||
];
|
||
acceleration = false;
|
||
};
|
||
};
|
||
security.rtkit.enable = true;
|
||
|
||
users.users.root.openssh.authorizedKeys.keys =
|
||
[
|
||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH8P/3yzsruekSaZ9b+yk429VTcfCtI1j8jnkNbPAgnr th3r00t@nixos"
|
||
];
|
||
system.stateVersion = "25.05"; # Did you read the comment?
|
||
}
|