Add files via upload

This commit is contained in:
kaii :3 (notquitek3t)
2026-03-08 06:59:57 +00:00
committed by GitHub
parent dfc11908a4
commit 9cadcac26b
10 changed files with 604 additions and 0 deletions
+67
View File
@@ -0,0 +1,67 @@
{
description = "NixOS configs";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
impermanence.url = "github:nix-community/impermanence";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
outputs = { self, nixpkgs, impermanence, nixos-hardware, ... }:
let
mkHost = system: modules: nixpkgs.lib.nixosSystem {
inherit system modules;
specialArgs = { inherit impermanence nixos-hardware; };
};
mkPiImage = modules: (nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = { inherit impermanence nixos-hardware; };
modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
impermanence.nixosModules.impermanence
nixos-hardware.nixosModules.raspberry-pi-4
] ++ modules;
}).config.system.build.sdImage;
in {
nixosConfigurations = {
"TheBlackBox" = mkHost "x86_64-linux" [
./modules/common.nix
./modules/desktop-common.nix
./hosts/desktop/configuration.nix
];
"T14" = mkHost "x86_64-linux" [
./modules/common.nix
./modules/desktop-common.nix
./hosts/laptop/configuration.nix
];
Pontiac-G5 = mkHost "aarch64-linux" [
impermanence.nixosModules.impermanence
nixos-hardware.nixosModules.raspberry-pi-4
./modules/common.nix
./modules/pi-common.nix
./hosts/pi-car/configuration.nix
];
pi-htpc = mkHost "aarch64-linux" [
nixos-hardware.nixosModules.raspberry-pi-4
./modules/common.nix
./modules/pi-common.nix
./hosts/pi-htpc/configuration.nix
];
};
# SD card images
images = {
pi-car = mkPiImage [
./modules/common.nix
./modules/pi-common.nix
./hosts/pi-car/configuration.nix
];
pi-htpc = mkPiImage [
./modules/common.nix
./modules/pi-common.nix
./hosts/pi-htpc/configuration.nix
];
};
};
}
+26
View File
@@ -0,0 +1,26 @@
# 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 =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
services.beesd.filesystems = {
root = {
spec = "LABEL=NixOS";
hashTableSizeMB = 512;
verbosity = "crit";
extraOptions = [ "--loadavg-target" "8.0" ];
};
};
networking.hostName = "TheBlackBox"; # Define your hostname.
services.openssh.enable = true;
virtualisation.vmware.host.enable = true;
}
+35
View File
@@ -0,0 +1,35 @@
# 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 + "/installer/scan/not-detected.nix")
];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/0480bb3b-4e70-4166-af4d-253e8ed5b041";
fsType = "btrfs";
options = [ "subvol=@" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/0480bb3b-4e70-4166-af4d-253e8ed5b041";
fsType = "btrfs";
options = [ "subvol=@home" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/86E7-92E1";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/fe32f9af-3382-4505-90e3-aaf1c41bf5d4"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
+26
View File
@@ -0,0 +1,26 @@
# 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 =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
services.beesd.filesystems = {
root = {
spec = "LABEL=NixOS";
hashTableSizeMB = 256;
verbosity = "crit";
extraOptions = [ "--loadavg-target" "1.5" ];
};
};
networking.hostName = "T14"; # Define your hostname.
services.openssh.enable = true;
virtualisation.vmware.host.enable = true;
}
+52
View File
@@ -0,0 +1,52 @@
# Pontiac G5 Pi AUX Unit (i dont know wtf to name this thing)
clear
cat <<EOF
██╗ ██╗██████╗ ████████╗██╗ ██╗██╗ ██╗███████╗ ██████╗ ███████╗██╗ ██╗███████╗██╗ ██████╗ ██████╗ ███╗ ███╗███████╗███╗ ██╗████████╗
██║ ██╔╝╚════██╗╚══██╔══╝╚██╗██╔╝╚██╗ ██╔╝╚══███╔╝ ██╔══██╗██╔════╝██║ ██║██╔════╝██║ ██╔═══██╗██╔══██╗████╗ ████║██╔════╝████╗ ██║╚══██╔══╝
█████╔╝ █████╔╝ ██║ ╚███╔╝ ╚████╔╝ ███╔╝ ██║ ██║█████╗ ██║ ██║█████╗ ██║ ██║ ██║██████╔╝██╔████╔██║█████╗ ██╔██╗ ██║ ██║
██╔═██╗ ╚═══██╗ ██║ ██╔██╗ ╚██╔╝ ███╔╝ ██║ ██║██╔══╝ ╚██╗ ██╔╝██╔══╝ ██║ ██║ ██║██╔═══╝ ██║╚██╔╝██║██╔══╝ ██║╚██╗██║ ██║
██║ ██╗██████╔╝ ██║██╗██╔╝ ██╗ ██║ ███████╗ ██████╔╝███████╗ ╚████╔╝ ███████╗███████╗╚██████╔╝██║ ██║ ╚═╝ ██║███████╗██║ ╚████║ ██║
╚═╝ ╚═╝╚═════╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═════╝ ╚══════╝ ╚═══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝
EOF
# Functions
logger() {
local message="$*"
local timestamp=$(date '+%b %e %H:%M:%S') # e.g., Mar 8 14:35:22
local hostname=$(hostname)
local pid=$$ # PID of the current script
echo "$timestamp g5pi[$pid]: $message"
}
# bluetooth network loop
netloop() {
# Exit if already locked
[[ -e /tmp/netloop ]] && return 0
touch /tmp/netloop
while :; do
# Check if "Pixel 6a Network" is active
if ! nmcli -t -f NAME connection show --active | grep -qx "Pixel 6a Network"; then
#echo "Connecting to Pixel 6a Network..."
nmcli connection up "Pixel 6a Network"
fi
sleep 5
done
}
echo "$(date) [g5pi] starting up.."
journalctl -f &
# bump up that aux to the highest it can be
pactl set-sink-volume alsa_output.platform-fe00b840.mailbox.stereo-fallback 100%
# Bluetooth preparation
bluetoothctl <<EOF
power on
agent NoInputNoOutput
default-agent
system-alias "Pontiac G5"
discoverable on
pairable on
EOF
netloop &
tail
+65
View File
@@ -0,0 +1,65 @@
{ pkgs, ... }: {
networking.hostName = "Pontiac-G5";
systemd.services = {
"autovt@tty1" = {
enable = true;
restartIfChanged = false;
description = "autologin service at tty1";
after = [ "suppress-kernel-logging.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = builtins.concatStringsSep " " ([
"@${pkgs.utillinux}/sbin/agetty"
"agetty --login-program ${pkgs.shadow}/bin/login"
"--autologin k3t --noclear %I $TERM"
]);
Restart = "always";
Type = "idle";
};
};
"suppress-kernel-logging" = {
enable = true;
restartIfChanged = false;
description = "suppress kernel logging to the console";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.utillinux}/sbin/dmesg -n 1";
Type = "oneshot";
};
};
};
# bluetooth - headless auto pair
hardware.bluetooth.settings = {
Policy.AutoEnable = true;
General = {
Name = "Pontiac G5";
DiscoverableTimeout = 0;
PairableTimeout = 0;
Class = "0x200408";
};
};
systemd.services.bluetooth-auto-pair = {
description = "Bluetooth headless auto-pair agent";
after = [ "bluetooth.service" ];
wants = [ "bluetooth.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.bluez-tools}/bin/bt-agent -c NoInputNoOutput";
Restart = "on-failure";
};
};
# pipewire for audio
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = false;
pulse.enable = true;
};
systemd.user.services.pipewire.wantedBy = [ "default.target" ];
systemd.user.services.pipewire-pulse.wantedBy = [ "default.target" ];
}
+27
View File
@@ -0,0 +1,27 @@
{ pkgs, ... }: {
networking.hostName = "htpc";
users.users.user = {
isNormalUser = true;
extraGroups = [ "audio" "video" "input" ];
};
# Kodi — run as a dedicated user session
services.xserver.enable = true;
services.displayManager.autoLogin = {
enable = true;
user = "user";
};
services.xserver.desktopManager.kodi.enable = true;
# audio
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = false;
pulse.enable = true;
};
hardware.opengl.enable = true;
}
+73
View File
@@ -0,0 +1,73 @@
{ pkgs, ... }: {
nix = {
settings = {
substituters = [
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
experimental-features = [ "nix-command" "flakes" ];
optimise.automatic = true;
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 2d";
};
};
nixpkgs.config.allowUnfree = true;
# auto upgrade from your public repo
system.autoUpgrade = {
enable = true;
flake = "github:notquitek3t/nixconf"; # replace with your github username
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
# networking
networking.networkmanager.enable = true;
environment.systemPackages = with pkgs; [
git
neovim
caligula
openssl
topgrade
htop
mosh
btop
wget2
python314
];
users.users.k3t = {
description = "Kai Moore";
isNormalUser = true;
extraGroups = [ "audio" "video" "bluetooth" "wheel" "input" "networkmanager" ];
initialPassword = "password";
linger = true;
};
# locale / time — adjust as needed
time.timeZone = "America/Denver";
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";
};
system.stateVersion = "25.11";
}
+192
View File
@@ -0,0 +1,192 @@
{ pkgs, ... }: {
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_lqx;
boot.kernelParams = [ "i915.enable_guc=3" ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
# Self Maintenance
services.btrfs.autoScrub = {
enable = true;
interval = "weekly";
fileSystems = [ "/" ];
};
# Support
services.flatpak.enable = true;
boot.binfmt.preferStaticEmulators = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
hardware.graphics.enable32Bit = true;
programs.nix-ld.enable = true;
programs.appimage.enable = true;
programs.appimage.binfmt = true;
# Enable CUPS to print documents.
services.printing.enable = true;
# graphics
hardware.enableRedistributableFirmware = true;
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
# Required for modern Intel GPUs (Xe iGPU and ARC)
intel-media-driver # VA-API (iHD) userspace
vpl-gpu-rt # oneVPL (QSV) runtime
# Optional (compute / tooling):
intel-compute-runtime # OpenCL (NEO) + Level Zero for Arc/Xe
# NOTE: 'intel-ocl' also exists as a legacy package; not recommended for Arc/Xe.
# libvdpau-va-gl # Only if you must run VDPAU-only apps
];
};
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD"; # Prefer the modern iHD backend
# VDPAU_DRIVER = "va_gl"; # Only if using libvdpau-va-gl
};
# X11
services.xserver = {
videoDrivers = [ "modesetting" "amdgpu" ];
enable = true;
xkb = {
layout = "us";
variant = "";
};
desktopManager = {
xterm.enable = false;
xfce = {
enable = true;
noDesktop = true;
enableXfwm = false;
};
};
libinput.enable = true;
windowManager.i3.enable = true;
};
services.displayManager.defaultSession = "xfce";
# desktop oriented bluetooth settings
hardware.bluetooth = {
settings = {
General = {
# Shows battery charge of connected devices on supported
# Bluetooth adapters. Defaults to 'false'.
Experimental = true;
KernelExperimental = true;
# When enabled other devices can connect faster to us, however
# the tradeoff is increased power consumption. Defaults to
# 'false'.
FastConnectable = true;
ControllerMode = "bredr";
};
Policy = {
# Enable all controllers when they are found. This includes
# adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'true'.
AutoEnable = true;
};
};
};
# Sunshine (remote desktop)
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true;
openFirewall = true;
};
# Enable sound with pipewire.
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
wireplumber.extraConfig.bluetoothEnhancements = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" "a2dp_sink" "a2dp_source" "bap_sink" "bap_source" ];
};
};
};
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.kdeconnect.enable = true;
programs.firefox = {
enable = true;
package = librewolf;
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
Preferences = {
"cookiebanners.service.mode.privateBrowsing" = 2; # Block cookie banners in private browsing
"cookiebanners.service.mode" = 2; # Block cookie banners
"privacy.donottrackheader.enabled" = true;
"privacy.fingerprintingProtection" = true;
"privacy.resistFingerprinting" = true;
"privacy.trackingprotection.emailtracking.enabled" = true;
"privacy.trackingprotection.enabled" = true;
"privacy.trackingprotection.fingerprinting.enabled" = true;
"privacy.trackingprotection.socialtracking.enabled" = true;
};
ExtensionSettings = {
"jid1-ZAdIEUB7XOzOJw@jetpack" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/duckduckgo-for-firefox/latest.xpi";
installation_mode = "force_installed";
};
"uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
};
};
};
};
environment.etc."firefox/policies/policies.json".target = "librewolf/policies/policies.json";
users.users.k3t = {
packages = with pkgs; [
anydesk
dwarfs
bubblewrap
fuse-overlayfs
nicotine-plus
qbittorrent
kdePackages.kate
lutris
gearlever
remmina
thunderbird
prismlauncher
jellyfin-desktop
flatpak
vscode.fhs
signal-desktop
spotify
wineWowPackages.waylandFull
virt-viewer
winetricks
];
};
}
+41
View File
@@ -0,0 +1,41 @@
{ pkgs, ... }: {
boot.initrd.allowMissingModules = true;
boot.supportedFilesystems.zfs = false;
boot.kernelPackages = pkgs.linuxPackages_rpi4;
fileSystems = {
"/" = { device = "/dev/disk/by-label/NIXOS_SD"; fsType = "ext4"; };
};
# Pi 4 specific
hardware = {
raspberry-pi."4" = {
apply-overlays-dtmerge.enable = true;
bluetooth.enable = true;
};
enableRedistributableFirmware = true;
};
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
console.enable = false;
environment.systemPackages = with pkgs; [
libraspberrypi
raspberrypi-eeprom
];
# ssh so you can manage them remotely
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
};
# auto upgrade on pis can reboot unattended
system.autoUpgrade = {
operation = "boot";
allowReboot = true;
rebootWindow = { lower = "02:00"; upper = "05:00"; };
};
}