add nix-on-droid home config [WIP]

This commit is contained in:
2025-01-16 10:47:14 -06:00
parent 945e3765e8
commit d7c7a46571
64 changed files with 2616 additions and 0 deletions

View File

@@ -0,0 +1,111 @@
{ config, lib, pkgs, inputs, ... }: let
system = "x86_64-linux";
pkgs-us = import inputs.nixpkgs-us {
inherit system;
config.allowUnfree = true;
};
in {
imports = [
./scripts
];
options.homeconfig.minimal = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkMerge [
{
home.packages = with pkgs; [
killall
zip
unzip
gcc
zulu
rsync
lxqt.lxqt-policykit
blueberry
wl-clipboard
xfce.thunar
grim
slurp
];
}
(lib.mkIf (!config.homeconfig.minimal) {
nixpkgs.config = {
allowUnfree = true;
#allowBroken = true;
};
home.packages = with pkgs; let
pypkgs = ps: with ps; [
numpy
pandas
torch
torchvision
torchaudio
transformers
datasets
pyaudio
faster-whisper
pyusb
];
in [
cava
android-tools
neovim-remote
handbrake
(pkgs.python311.withPackages pypkgs)
brightnessctl
libdbusmenu-gtk3
lmms
#unfree {
geogebra
#}
neofetch
pkgs-us.mpv
(ncmpcpp.override { visualizerSupport = true; clockSupport = true; })
playerctl
mpc-cli
vlc
pavucontrol
yewtube
ytmdl
ffmpeg
rpi-imager
tigervnc
keepassxc
httplz
#school?
#pkgs-us.digital
#3D modeling/printing
kicad
blender
freecad
#cura
#productivity
libreoffice
super-productivity
#games
prismlauncher
];
})
];
}

View File

@@ -0,0 +1,97 @@
{ config, lib, pkgs, ... }: {
options = {
homeScripts.enable = lib.options.mkOption {
type = lib.types.bool;
default = true;
};
};
config = lib.mkIf config.homeScripts.enable {
home.packages = [
#scripts
(pkgs.writeShellScriptBin "_systemRebuild" ''
${pkgs.nh}/bin/nh os switch --ask /home/nathan/Projects/System
echo //////Enter to close//////
read
'')
(pkgs.writeShellScriptBin "_homeRebuild" ''
${pkgs.nh}/bin/nh home switch --ask /home/nathan/Projects/System
echo //////Enter to close//////
read
'')
(pkgs.writeShellScriptBin "randWallpaper" ''
file=$(ls /home/nathan/Pictures/Wallpaper/ | shuf -n 1)
setWallpaper /home/nathan/Pictures/Wallpaper/$file
'')
(pkgs.writeShellScriptBin "setWallpaper" ''
img=''$(realpath ''${1:-~/.cache/bg})
p=''$(ps -e | grep mpvpaper | sed -n -e "s/ *//" -e "s/ /\n/" -e "1 P")
${pkgs.mpvpaper}/bin/mpvpaper -f -o "loop" '*' $img && \
changeColors $img $2 && \
sleep 0.4 && \
kill $p
'')
(pkgs.writeShellScriptBin "changeColors" ''
if [[ $(ls ~/.cache/ | grep bga) != bga ]]; then
echo 100 > ~/.cache/bga
fi
alpha=''${2:-`cat ~/.cache/bga`}
img=''$(realpath ''${1:-~/.cache/bg})
if [[ $alpha -lt 0 ]]; then
$alpha=0
fi
if [[ $alpha -gt 100 ]]; then
$alpha=100
fi
wal -i $img -a $alpha --cols16 -n
echo $alpha > ~/.cache/bga
rm ~/.cache/bg
ln -s $img ~/.cache/bg
sleep 0.4
pywalfox update &
themecord > ~/.cache/_.txt && rm ~/.cache/_.txt
[[ $(pidof cava) != "" ]] && pkill -USR1 cava &
for i in $(ls /run/user/1000 | grep nvim); do nvr -s --servername /run/user/1000/$i --remote-send '<cmd>colorscheme pywal<CR>'; done
pkill -USR1 kitty
'')
(pkgs.writeShellScriptBin "onSystemStart" ''
randWallpaper &
ags &
pypr &
lxqt-policykit-agent &
# nmcli device wifi connect EagleNet password '~?C#@ZiH' &
hyprctl setcursor Bibata-Modern-Classic 16 &
wayvnc &
hyprctl reload &
novnc &
'')
(pkgs.writeShellScriptBin "colorPrefix" ''
exec -a "$0" "$@" &
sleep 0.4 && changeColors &
'')
];
};
}