(desktop) Gen 494: reformatted several files using alejandra

This commit is contained in:
pagedMov
2024-10-15 20:16:32 -04:00
parent 1441353258
commit bd1add14bb
98 changed files with 6440 additions and 3256 deletions

View File

@@ -1,35 +1,36 @@
{ self, pkgs }:
{
self,
pkgs,
}:
pkgs.writeShellScriptBin "homep" ''
#!/run/current-system/sw/bin/bash
# Ensure the package manifest is generated or updated
if [ ! -f "/tmp/nixpkgs_manifest.txt" ]; then
echo "Generating Nixpkgs manifest..."
nix-env -qaP 2>/dev/null | awk '{print $1}' | sed 's/nixos\.//' > /tmp/nixpkgs_manifest.txt
fi
pkgs.writeShellScriptBin "homep" (''
#!/run/current-system/sw/bin/bash
# Select packages using fzf with multi-select enabled
selected_packages=$(cat /tmp/nixpkgs_manifest.txt | fzf -m)
# Ensure the package manifest is generated or updated
if [ ! -f "/tmp/nixpkgs_manifest.txt" ]; then
echo "Generating Nixpkgs manifest..."
nix-env -qaP 2>/dev/null | awk '{print $1}' | sed 's/nixos\.//' > /tmp/nixpkgs_manifest.txt
fi
# Check if any packages were selected
if [ -n "$selected_packages" ]; then
echo "$selected_packages" | while read -r package; do
# Append each selected package to the Nix config file
sed -i "/^\t]/i \ \t\t$package" "$HOME/sysflakes/glasshouse-desktop/home/userpkgs.nix"
echo "Added $package to the Home Manager configuration."
done
# Select packages using fzf with multi-select enabled
selected_packages=$(cat /tmp/nixpkgs_manifest.txt | fzf -m)
echo "Packages added successfully. Rebuild system config?"
select yn in "Yes" "No"; do
case $yn in
"Yes" ) nixswitch;break;;
"No" ) exit;;
esac
done
# Check if any packages were selected
if [ -n "$selected_packages" ]; then
echo "$selected_packages" | while read -r package; do
# Append each selected package to the Nix config file
sed -i "/^\t]/i \ \t\t$package" "$HOME/sysflakes/glasshouse-desktop/home/userpkgs.nix"
echo "Added $package to the Home Manager configuration."
done
echo "Packages added successfully. Rebuild system config?"
select yn in "Yes" "No"; do
case $yn in
"Yes" ) nixswitch;break;;
"No" ) exit;;
esac
done
else
echo "No packages selected."
fi
'')
else
echo "No packages selected."
fi
''