install.sh refactor

This commit is contained in:
2024-04-17 19:59:22 +00:00
parent 9db8ffdc44
commit d3d2e78af0
2 changed files with 17 additions and 32 deletions

View File

@@ -18,17 +18,19 @@
# Packages to install: # Packages to install:
# GUI Apps # GUI Apps
obsidian # Markdown Knowledge Base obsidian # Markdown Knowledge Base
signal-desktop # Signal Messages signal-desktop # Signal Messages
fragments # Torrent Client fragments # Torrent Client
element-desktop # Matrix Messages element-desktop # Matrix Messages
gnome-secrets # Password Manager gnome-secrets # Password Manager
newsflash # RSS Reader [Nextcloud] newsflash # RSS Reader [Nextcloud]
eyedropper # Color Picker eyedropper # Color Picker
gnome-obfuscate # Image Editor gnome-obfuscate # Image Editor
gnome-podcasts # Podcast Client gnome-podcasts # Podcast Client
gnome.geary # Email Client [GNOME Online Accounts] gnome.geary # Email Client [GNOME Online Accounts]
impression # Usb Flash Tool impression # Usb Flash Tool
gnome.gnome-calendar # Calendar [Nextcloud]
gnome.nautilus # File Manager
# CLI Apps # CLI Apps
dconf2nix # Dconf to Nix format. dconf2nix # Dconf to Nix format.
@@ -493,6 +495,7 @@
man = "batman"; man = "batman";
diff = "batdiff"; diff = "batdiff";
neofetch = "fastfetch"; neofetch = "fastfetch";
sudo = "sudo -i";
}; };
initExtra = "set completion-ignore-case On"; initExtra = "set completion-ignore-case On";
bashrcExtra = '' bashrcExtra = ''

View File

@@ -2,32 +2,14 @@
export NIXPKGS_ALLOW_UNFREE=1 export NIXPKGS_ALLOW_UNFREE=1
detectDistro() { if [ "$(grep -Ei 'debian|buntu|mint' /etc/*release)" ]; then
if [ "$(uname -s)" = "Darwin" ]; then
echo "macOS"
else
if [ "$(grep -Ei 'debian|buntu|mint' /etc/*release)" ]; then
echo "Debian"
elif [ "$(grep -Ei 'arch|manjaro|artix' /etc/*release)" ]; then
echo "Arch"
elif [ "$(grep -Ei 'fedora' /etc/*release)" ]; then
echo "Fedora"
else
echo 1
return 1
fi
fi
}
d=$(detectDistro)
if [[ $d == "Debian" ]]; then
sudo apt install -y curl git sudo apt install -y curl git
elif [[ $d == "Arch" ]]; then elif [ "$(grep -Ei 'arch|manjaro|artix' /etc/*release)" ]; then
sudo pacman -Sy curl git sudo pacman -Sy curl git
sudo pacman -Sy gnome power-profiles-daemon fwupd gst-plugin-pipewire # Gnome and optional dependencies. sudo pacman -Sy gnome power-profiles-daemon fwupd gst-plugin-pipewire # Gnome and optional dependencies.
sudo systemctl enable power-profiles-daemon sudo systemctl enable power-profiles-daemon
sudo systemctl start power-profiles-daemon sudo systemctl start power-profiles-daemon
elif [[ $d == "Fedora" ]]; then elif [ "$(grep -Ei 'fedora' /etc/*release)" ]; then
sudo dnf install curl git sudo dnf install curl git
fi fi