Add files via upload
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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
|
||||
@@ -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" ];
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user