home managing

This commit is contained in:
k3t
2026-03-12 07:16:02 -06:00
parent 015efea33c
commit 8307d9bd72
3 changed files with 33 additions and 53 deletions
+32 -1
View File
@@ -5,9 +5,10 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
impermanence.url = "github:nix-community/impermanence"; impermanence.url = "github:nix-community/impermanence";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager.url = "github:nix-community/home-manager";
}; };
outputs = { self, nixpkgs, impermanence, nixos-hardware, ... }: outputs = { self, nixpkgs, impermanence, nixos-hardware, home-manager, ... }:
let let
mkHost = system: modules: nixpkgs.lib.nixosSystem { mkHost = system: modules: nixpkgs.lib.nixosSystem {
inherit system modules; inherit system modules;
@@ -29,16 +30,34 @@
./modules/common.nix ./modules/common.nix
./modules/desktop-common.nix ./modules/desktop-common.nix
./hosts/desktop/configuration.nix ./hosts/desktop/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.k3t = ./home/desktop.nix;
}
]; ];
"T14" = mkHost "x86_64-linux" [ "T14" = mkHost "x86_64-linux" [
./modules/common.nix ./modules/common.nix
./modules/desktop-common.nix ./modules/desktop-common.nix
./hosts/laptop/configuration.nix ./hosts/laptop/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.k3t = ./home/desktop.nix;
}
]; ];
"nixcloud" = mkHost "x86_64-linux" [ "nixcloud" = mkHost "x86_64-linux" [
./modules/common.nix ./modules/common.nix
./modules/vps-aarch64-common.nix ./modules/vps-aarch64-common.nix
./hosts/nixcloud/configuration.nix ./hosts/nixcloud/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.k3t = ./home/vps.nix;
}
]; ];
Pontiac-G5 = mkHost "aarch64-linux" [ Pontiac-G5 = mkHost "aarch64-linux" [
impermanence.nixosModules.impermanence impermanence.nixosModules.impermanence
@@ -46,12 +65,24 @@
./modules/common.nix ./modules/common.nix
./modules/pi-common.nix ./modules/pi-common.nix
./hosts/pi-car/configuration.nix ./hosts/pi-car/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.k3t = ./home/car.nix;
}
]; ];
pi-htpc = mkHost "aarch64-linux" [ pi-htpc = mkHost "aarch64-linux" [
nixos-hardware.nixosModules.raspberry-pi-4 nixos-hardware.nixosModules.raspberry-pi-4
./modules/common.nix ./modules/common.nix
./modules/pi-common.nix ./modules/pi-common.nix
./hosts/pi-htpc/configuration.nix ./hosts/pi-htpc/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.k3t = ./home/desktop.nix;
}
]; ];
}; };
-52
View File
@@ -1,52 +0,0 @@
# 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
+1
View File
@@ -33,6 +33,7 @@
# networking # networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
environment.pathsToLink = [ "/share/zsh" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git git
neovim neovim