reorganize and fix searxng
This commit is contained in:
121
homes/nathan/home-manager/packages/default.nix
Normal file
121
homes/nathan/home-manager/packages/default.nix
Normal file
@@ -0,0 +1,121 @@
|
||||
{ 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 = with lib; options.mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = with lib; mkMerge [
|
||||
{
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
||||
inputs.disko.packages.${pkgs.stdenv.hostPlatform.system}.disko-install
|
||||
|
||||
kjv
|
||||
openssh
|
||||
sops
|
||||
dig
|
||||
toybox
|
||||
btop
|
||||
zip
|
||||
unzip
|
||||
rsync
|
||||
curl
|
||||
|
||||
(python313.withPackages (ps: with ps; [
|
||||
gpustat
|
||||
numpy
|
||||
matplotlib
|
||||
scipy
|
||||
pandas
|
||||
pyaudio
|
||||
pyusb
|
||||
debugpy
|
||||
requests
|
||||
]))
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
(mkIf config.homeconfig.graphical {
|
||||
home.packages = with pkgs; [
|
||||
|
||||
grim
|
||||
slurp
|
||||
xfce.thunar
|
||||
wl-clipboard
|
||||
blueberry
|
||||
];
|
||||
})
|
||||
|
||||
(mkIf (!config.homeconfig.minimal) {
|
||||
home.packages = with pkgs; [
|
||||
cava
|
||||
android-tools
|
||||
neovim-remote
|
||||
zulu
|
||||
fastfetch
|
||||
ncmpcpp
|
||||
playerctl
|
||||
mpc
|
||||
ffmpeg
|
||||
];
|
||||
})
|
||||
|
||||
(mkIf (!config.homeconfig.minimal && config.homeconfig.graphical) {
|
||||
|
||||
nixpkgs.config = mkIf (!config.homeconfig.minimal) {
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
||||
handbrake
|
||||
quickemu
|
||||
bottles
|
||||
|
||||
pkgs-us.runapp
|
||||
brightnessctl
|
||||
libdbusmenu-gtk3
|
||||
lmms
|
||||
|
||||
#unfree {
|
||||
geogebra
|
||||
spotify
|
||||
discord
|
||||
#}
|
||||
rustdesk-flutter
|
||||
mpv
|
||||
vlc
|
||||
pavucontrol
|
||||
rpi-imager
|
||||
tigervnc
|
||||
keepassxc
|
||||
|
||||
#3D modeling/printing
|
||||
blender
|
||||
freecad-wayland
|
||||
cura-appimage
|
||||
|
||||
#productivity
|
||||
libreoffice
|
||||
|
||||
#games
|
||||
prismlauncher
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
135
homes/nathan/home-manager/packages/scripts/default.nix
Normal file
135
homes/nathan/home-manager/packages/scripts/default.nix
Normal file
@@ -0,0 +1,135 @@
|
||||
{ config, lib, pkgs, inputs, ... }: let
|
||||
|
||||
system = "x86_64-linux";
|
||||
|
||||
pkgs-us = import inputs.nixpkgs-us {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
in {
|
||||
|
||||
options = {
|
||||
homeconfig.scripts.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (config.homeconfig.hyprland.enable && config.homeconfig.scripts.enable) {
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "hyprrun" ''
|
||||
${pkgs-us.runapp}/bin/runapp ''$@
|
||||
#uwsm app -- ''$@
|
||||
'')
|
||||
];
|
||||
})
|
||||
|
||||
(lib.mkIf (!config.homeconfig.hyprland.enable && config.homeconfig.scripts.enable) {
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "hyprrun" ''
|
||||
eval "''$@"
|
||||
'')
|
||||
];
|
||||
})
|
||||
|
||||
(lib.mkIf config.homeconfig.scripts.enable {
|
||||
home.packages = [
|
||||
|
||||
#scripts
|
||||
|
||||
(pkgs.writeShellScriptBin "randWallpaper" ''
|
||||
file=''$(ls ${config.home.homeDirectory}/Pictures/Wallpaper/ | shuf -n 1)
|
||||
setWallpaper ${config.home.homeDirectory}/Pictures/Wallpaper/''$file
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "setWallpaper" ''
|
||||
|
||||
if [[ ! -d /tmp/nathan ]]; then
|
||||
mkdir /tmp/nathan
|
||||
fi
|
||||
|
||||
img=''$(realpath "''${1:-$(find ~/Pictures/Wallpaper/* | rofi -dmenu)}")
|
||||
n=''$(basename "''$img")
|
||||
ext="''${n''\#''\#*.}"
|
||||
out=''${3:-/dev/null}
|
||||
|
||||
if [[ ''$ext == "gif" || ''$ext == "mp4" ]]; then
|
||||
yes | ${pkgs.ffmpeg}/bin/ffmpeg -i "''$img" -vframes 1 /tmp/nathan/tmp.jpg >> ''$out
|
||||
cp /tmp/nathan/tmp.jpg /tmp/nathan/tmp2.jpg
|
||||
pidof mpvpaper && pkill mpvpaper
|
||||
${pkgs.swww}/bin/swww img /tmp/nathan/tmp.jpg -t wipe >> ''$out
|
||||
${pkgs.hyprpanel}/bin/hyprpanel sw /tmp/nathan/tmp2.jpg >> ''$out
|
||||
sleep 0.3
|
||||
hyprctl dispatch exec "${pkgs.mpvpaper}/bin/mpvpaper ALL ''$img -o loop"
|
||||
${pkgs.hyprpanel}/bin/hyprpanel sw /tmp/nathan/tmp.jpg >> ''$out
|
||||
rm /tmp/nathan/tmp2.jpg
|
||||
else
|
||||
pidof mpvpaper && pkill mpvpaper
|
||||
hyprctl dispatch exec "${pkgs.swww}/bin/swww img ''$img -t wipe" >> ''$out
|
||||
${pkgs.hyprpanel}/bin/hyprpanel sw "''$img" >> ''$out
|
||||
fi
|
||||
|
||||
changeColors "''$img" "''$2" >> ''$out
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "changeColors" ''
|
||||
|
||||
img=''$(realpath "''$1")
|
||||
alpha=''${2:-70}
|
||||
|
||||
if [[ ''$alpha -lt 0 ]]; then
|
||||
alpha=0
|
||||
elif [[ ''$alpha -gt 100 ]]; then
|
||||
alpha=100
|
||||
fi
|
||||
|
||||
if [[ -f ~/.config/wal/colorschemes/dark/''$(basename "''$img")-''$alpha.json ]]; then
|
||||
${pkgs.pywal16}/bin/wal -n -f "''$(basename "''$img")-''$alpha"
|
||||
else
|
||||
${pkgs.pywal16}/bin/wal -n -i "''$img" -a "''$alpha" --cols16 -p "''$(basename "''$img")-''$alpha"
|
||||
fi
|
||||
|
||||
colorPrefix
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "colorPrefix" ''
|
||||
pidof firefox > /dev/null && ${pkgs.pywalfox-native}/bin/pywalfox update &
|
||||
pidof kitty > /dev/null && pkill -USR1 kitty
|
||||
pidof cava > /dev/null && pkill -USR1 cava
|
||||
for i in ''$(ls /run/user/1000 | grep nvim); do
|
||||
${pkgs.neovim-remote}/bin/nvr -s --servername /run/user/1000/''$i --remote-send '<cmd>colorscheme pywal<CR>';
|
||||
done
|
||||
|
||||
eval "''$@"
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "onSystemStart" ''
|
||||
|
||||
if [[ ! -d /tmp/nathan ]]; then
|
||||
mkdir /tmp/nathan
|
||||
fi
|
||||
|
||||
if [[ -f ${config.home.homeDirectory}/.local/share/calcurse/.calcurse.pid ]]; then
|
||||
rm ${config.home.homeDirectory}/.local/share/calcurse/.calcurse.pid
|
||||
fi
|
||||
|
||||
hyprctl --batch "\
|
||||
dispatch exec ${pkgs.swww}/bin/swww-daemon ;\
|
||||
dispatch exec setWallpaper ${config.home.homeDirectory}/Pictures/Wallpaper/bluescape.jpg ;\
|
||||
dispatch exec ${pkgs.pyprland}/bin/pypr ;\
|
||||
dispatch exec ${pkgs.netbird-ui}/bin/netbird-ui ;\
|
||||
dispatch exec ${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent ;\
|
||||
setcursor Bibata-Modern-Classic 16"
|
||||
sleep 3
|
||||
hyprctl reload
|
||||
hyprctl dispatch exec ${pkgs.pyprland}/bin/pypr toggle calendar
|
||||
#tmux new-session -s hyprland
|
||||
'')
|
||||
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user