Refactor directory structure

This commit is contained in:
2025-09-11 10:49:07 -04:00
parent 03a4cc572a
commit 7ed720ce5f
19 changed files with 858 additions and 261 deletions

View File

@@ -0,0 +1,117 @@
# 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; [
];
};
users.users.th3r00t = {
isNormalUser = true;
description = "Mike 'th3r00t' Young";
extraGroups = [ "networkmanager" "wheel" "input" ];
packages = with pkgs; [
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH8P/3yzsruekSaZ9b+yk429VTcfCtI1j8jnkNbPAgnr th3r00t@nixos"
];
};
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?
}

View File

@@ -0,0 +1,58 @@
{ config, pkgs, ... }:
{
imports =
[
./shares.nix
./sops.nix
./services.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.trusted-users = [ "root" "th3r00t" ];
nix.extraOptions = ''
extra-substituters = https://devenv.cachix.org
extra-trusted-public-keys = devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=
'';
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
i18n.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";
};
nixpkgs.config.allowUnfree = true;
environment.variables.EDITOR = "nvim";
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
networking = {
hosts = {
"10.0.0.76" = [ "nas nas.lan" ];
"10.0.0.125" = [ "git" "git.lan" ];
"10.0.0.153" = [ "samphone" "samphone.lan" ];
"10.0.0.223" = [ "pve" "pve.lan" ];
"10.0.0.39" = [ "chronos" "chronos.lan" ];
"10.0.0.78" = [ "pyshelf" "pyshelf.lan" ];
"10.0.0.121" = [ "titan" "titan.lan" ];
"10.0.0.141" = [ "athena" "athena.lan" ];
"10.0.0.107" = [ "psql" "psql.lan" ];
"10.0.0.99" = [ "jelly" "jelly.lan" ];
"10.0.0.207" = [ "sync" "sync.lan" ];
"10.0.0.14" = [ "radios" "radios.lan" ];
"10.0.0.172" = [ "vault" "vault.lan" ];
"10.0.0.109" = [ "adguard" "adguard.lan" ];
"10.0.0.50" = [ "dashy" "dashy.lan" ];
};
};
}

View File

@@ -0,0 +1,104 @@
# 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-titan.nix
./server-partitioning.nix
./configuration-common.nix
];
nixpkgs.config.allowUnfree = true;
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;
supportedFilesystems = [ "vfat" "btrfs" "cifs" ];
extraModulePackages = [ ];
extraModprobeConfig = ''
'';
};
networking = {
hostName = "Titan"; # 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; [
];
};
users.users.th3r00t = {
isNormalUser = true;
description = "Mike 'th3r00t' Young";
extraGroups = [ "networkmanager" "wheel" "input" ];
packages = with pkgs; [
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH8P/3yzsruekSaZ9b+yk429VTcfCtI1j8jnkNbPAgnr th3r00t@nixos"
];
};
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;
};
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?
}

View File

@@ -0,0 +1,128 @@
# 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 =
[
./configuration-common.nix
./laptop.nix
];
# Bootloader.
boot = {
kernelPackages = pkgs.linuxPackages_latest;
initrd.availableKernelModules = [
"xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"
];
kernelModules = [ "fuse" "coretemp" "cifs" "kvm-intel" ];
initrd.kernelModules = [ "ath10k_pci" ];
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
supportedFilesystems = [ "vfat" "ext4" "cifs" "exfat" ];
extraModulePackages = [ ];
extraModprobeConfig = ''
options ath10k_pcs irq_mode=1
options ath10k_core rawmode=1
'';
};
security.rtkit.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
fonts = {
enableDefaultPackages = true;
fontDir.enable = true;
packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
font-awesome
material-design-icons
noto-fonts-emoji
]++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Experimental = true;
FastConnectable = true;
};
Policy = {
AutoEnable=true;
};
};
};
# Define a user account. Don't forget to set a password with passwd.
users.users.th3r00t = {
isNormalUser = true;
description = "Mike 'th3r00t' Young";
extraGroups = [ "networkmanager" "wheel" "input" ];
packages = with pkgs; [
# kdePackages.kate
# thunderbird
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
git
vim
curl
age
];
#media-session.enable = true;
programs = {
mtr.enable = true;
firefox.enable = true;
hyprland = {
enable = true;
withUWSM = true;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
};
# uwsm.enable = true;
};
services = {
blueman.enable = true;
openssh.enable = true;
displayManager.autoLogin.enable = true;
displayManager.autoLogin.user = "th3r00t";
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
udisks2.enable = false;
printing.enable = true;
pulseaudio.enable = false;
libinput.enable = true;
# logmein-hamachi.enable = true;
};
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 21 22 80 443 5900 8080 12121 12122 61208 ];
networking.firewall.allowedUDPPorts = [ 21 22 80 443 5900 8080 12121 12122 61208 ];
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.05"; # Did you read the comment?
}

View File

@@ -0,0 +1,24 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}