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,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?
}