Compare commits
No commits in common. "907352965da90e8c565bd8aaa3a9be429ca4bf3c" and "793937d34d560aefa3c0a190354c9a18fc14a860" have entirely different histories.
907352965d
...
793937d34d
153
install.sh
|
|
@ -1,34 +1,35 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
# Vars
|
# Vars
|
||||||
CURRENT_USERNAME='frostphoenix'
|
CURRENT_USERNAME='frostphoenix'
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
NORMAL=$(tput sgr0)
|
NORMAL=$(tput sgr0)
|
||||||
WHITE=$(tput setaf 7)
|
WHITE=$(tput setaf 7)
|
||||||
BLACK=$(tput setaf 0)
|
BLACK=$(tput setaf 0)
|
||||||
RED=$(tput setaf 1)
|
RED=$(tput setaf 1)
|
||||||
GREEN=$(tput setaf 2)
|
GREEN=$(tput setaf 2)
|
||||||
YELLOW=$(tput setaf 3)
|
YELLOW=$(tput setaf 3)
|
||||||
BLUE=$(tput setaf 4)
|
BLUE=$(tput setaf 4)
|
||||||
MAGENTA=$(tput setaf 5)
|
MAGENTA=$(tput setaf 5)
|
||||||
CYAN=$(tput setaf 6)
|
CYAN=$(tput setaf 6)
|
||||||
BRIGHT=$(tput bold)
|
BRIGHT=$(tput bold)
|
||||||
UNDERLINE=$(tput smul)
|
UNDERLINE=$(tput smul)
|
||||||
}
|
}
|
||||||
|
|
||||||
confirm() {
|
confirm() {
|
||||||
echo -en "[${GREEN}y${NORMAL}/${RED}n${NORMAL}]: "
|
echo -en "[${GREEN}y${NORMAL}/${RED}n${NORMAL}]: "
|
||||||
read -n 1 -r
|
read -n 1 -r
|
||||||
echo
|
echo
|
||||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
if [[ ! $REPLY =~ ^[Yy]$ ]]
|
||||||
exit 0
|
then
|
||||||
fi
|
exit 0
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
print_header() {
|
print_header() {
|
||||||
echo -E "$CYAN
|
echo -E "$CYAN
|
||||||
_____ _ ____ _ _
|
_____ _ ____ _ _
|
||||||
| ___| __ ___ ___| |_| _ \| |__ ___ ___ _ __ (_)_ __
|
| ___| __ ___ ___| |_| _ \| |__ ___ ___ _ __ (_)_ __
|
||||||
| |_ | '__/ _ \/ __| __| |_) | '_ \ / _ \ / _ \ '_ \| \ \/ /
|
| |_ | '__/ _ \/ __| __| |_) | '_ \ / _ \ / _ \ '_ \| \ \/ /
|
||||||
|
|
@ -49,77 +50,85 @@ print_header() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_username() {
|
get_username() {
|
||||||
echo -en "Enter your$GREEN username$NORMAL : $YELLOW"
|
echo -en "Enter your$GREEN username$NORMAL : $YELLOW"
|
||||||
read username
|
read username
|
||||||
echo -en "$NORMAL"
|
echo -en "$NORMAL"
|
||||||
echo -en "Use$YELLOW "$username"$NORMAL as ${GREEN}username${NORMAL} ? "
|
echo -en "Use$YELLOW "$username"$NORMAL as ${GREEN}username${NORMAL} ? "
|
||||||
confirm
|
confirm
|
||||||
}
|
}
|
||||||
|
|
||||||
set_username() {
|
set_username() {
|
||||||
sed -i -e "s/${CURRENT_USERNAME}/${username}/g" ./flake.nix
|
sed -i -e "s/${CURRENT_USERNAME}/${username}/g" ./flake.nix
|
||||||
sed -i -e "s/${CURRENT_USERNAME}/${username}/g" ./modules/home/audacious/config
|
sed -i -e "s/${CURRENT_USERNAME}/${username}/g" ./modules/home/audacious/config
|
||||||
}
|
}
|
||||||
|
|
||||||
get_host() {
|
get_host() {
|
||||||
echo -en "Choose a ${GREEN}host${NORMAL} - [${YELLOW}D${NORMAL}]esktop, [${YELLOW}L${NORMAL}]aptop or [${YELLOW}V${NORMAL}]irtual machine: "
|
echo -en "Choose a ${GREEN}host${NORMAL} - [${YELLOW}D${NORMAL}]esktop, [${YELLOW}L${NORMAL}]aptop or [${YELLOW}V${NORMAL}]irtual machine: "
|
||||||
read -n 1 -r
|
read -n 1 -r
|
||||||
echo
|
echo
|
||||||
|
|
||||||
if [[ $REPLY =~ ^[Dd]$ ]]; then
|
if [[ $REPLY =~ ^[Dd]$ ]]; then
|
||||||
HOST='desktop'
|
HOST='desktop'
|
||||||
elif [[ $REPLY =~ ^[Ll]$ ]]; then
|
elif [[ $REPLY =~ ^[Ll]$ ]]; then
|
||||||
HOST='laptop'
|
HOST='laptop'
|
||||||
elif [[ $REPLY =~ ^[Vv]$ ]]; then
|
elif [[ $REPLY =~ ^[Vv]$ ]]; then
|
||||||
HOST='vm'
|
HOST='vm'
|
||||||
else
|
else
|
||||||
echo "Invalid choice. Please select 'D' for desktop, 'L' for laptop or 'V' for virtual machine."
|
echo "Invalid choice. Please select 'D' for desktop, 'L' for laptop or 'V' for virtual machine."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -en "$NORMAL"
|
echo -en "$NORMAL"
|
||||||
echo -en "Use the$YELLOW "$HOST"$NORMAL ${GREEN}host${NORMAL} ? "
|
echo -en "Use the$YELLOW "$HOST"$NORMAL ${GREEN}host${NORMAL} ? "
|
||||||
confirm
|
confirm
|
||||||
}
|
}
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
echo -e "\n${RED}START INSTALL PHASE${NORMAL}\n"
|
echo -e "\n${RED}START INSTALL PHASE${NORMAL}\n"
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
|
|
||||||
# Create basic directories
|
# Create basic directories
|
||||||
echo -e "Creating folders:"
|
echo -e "Creating folders:"
|
||||||
echo -e " - ${MAGENTA}~/Music${NORMAL}"
|
echo -e " - ${MAGENTA}~/Music${NORMAL}"
|
||||||
echo -e " - ${MAGENTA}~/Documents${NORMAL}"
|
echo -e " - ${MAGENTA}~/Documents${NORMAL}"
|
||||||
echo -e " - ${MAGENTA}~/Pictures/wallpapers/others${NORMAL}"
|
echo -e " - ${MAGENTA}~/Pictures/wallpapers/others${NORMAL}"
|
||||||
mkdir -p ~/Music
|
mkdir -p ~/Music
|
||||||
mkdir -p ~/Documents
|
mkdir -p ~/Documents
|
||||||
mkdir -p ~/Pictures/wallpapers/others
|
mkdir -p ~/Pictures/wallpapers/others
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
|
|
||||||
# Get the hardware configuration
|
# Copy the wallpapers
|
||||||
echo -e "Copying ${MAGENTA}/etc/nixos/hardware-configuration.nix${NORMAL} to ${MAGENTA}./hosts/${HOST}/${NORMAL}\n"
|
echo -e "Copying all ${MAGENTA}wallpapers${NORMAL}"
|
||||||
cp /etc/nixos/hardware-configuration.nix hosts/${HOST}/hardware-configuration.nix
|
cp -r wallpapers/wallpaper.png ~/Pictures/wallpapers
|
||||||
sleep 0.2
|
cp -r wallpapers/otherWallpaper/catppuccin/* ~/Pictures/wallpapers/others/
|
||||||
|
cp -r wallpapers/otherWallpaper/nixos/* ~/Pictures/wallpapers/others/
|
||||||
|
cp -r wallpapers/otherWallpaper/others/* ~/Pictures/wallpapers/others/
|
||||||
|
sleep 0.2
|
||||||
|
|
||||||
# Last Confirmation
|
# Get the hardware configuration
|
||||||
echo -en "You are about to start the system build, do you want to process ? "
|
echo -e "Copying ${MAGENTA}/etc/nixos/hardware-configuration.nix${NORMAL} to ${MAGENTA}./hosts/${HOST}/${NORMAL}\n"
|
||||||
confirm
|
cp /etc/nixos/hardware-configuration.nix hosts/${HOST}/hardware-configuration.nix
|
||||||
|
sleep 0.2
|
||||||
|
|
||||||
# Build the system (flakes + home manager)
|
# Last Confirmation
|
||||||
echo -e "\nBuilding the system...\n"
|
echo -en "You are about to start the system build, do you want to process ? "
|
||||||
sudo nixos-rebuild switch --flake .#${HOST}
|
confirm
|
||||||
|
|
||||||
|
# Build the system (flakes + home manager)
|
||||||
|
echo -e "\nBuilding the system...\n"
|
||||||
|
sudo nixos-rebuild switch --flake .#${HOST}
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
init
|
init
|
||||||
|
|
||||||
print_header
|
print_header
|
||||||
|
|
||||||
get_username
|
get_username
|
||||||
set_username
|
set_username
|
||||||
get_host
|
get_host
|
||||||
|
|
||||||
install
|
install
|
||||||
}
|
}
|
||||||
|
|
||||||
main && exit 0
|
main && exit 0
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,7 @@
|
||||||
"waybar &"
|
"waybar &"
|
||||||
"swaync &"
|
"swaync &"
|
||||||
"wl-paste --watch cliphist store &"
|
"wl-paste --watch cliphist store &"
|
||||||
"yubikey-touch-detector --libnotify &"
|
"yubikey-touch-detector --libnotify"
|
||||||
"mpDris2 &"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
|
|
@ -172,7 +171,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
animations = {
|
animations = {
|
||||||
enabled = false;
|
enabled = true;
|
||||||
|
|
||||||
bezier = [
|
bezier = [
|
||||||
"fluent_decel, 0, 0.2, 0.4, 1"
|
"fluent_decel, 0, 0.2, 0.4, 1"
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
vimv
|
vimv
|
||||||
iamb
|
iamb
|
||||||
pass
|
pass
|
||||||
|
pixcat
|
||||||
lm_sensors
|
lm_sensors
|
||||||
neofetch
|
neofetch
|
||||||
hyfetch
|
hyfetch
|
||||||
|
|
@ -55,11 +56,6 @@
|
||||||
rustc
|
rustc
|
||||||
wikit
|
wikit
|
||||||
reader
|
reader
|
||||||
nmap
|
|
||||||
speedtest-go
|
|
||||||
delta
|
|
||||||
powertop
|
|
||||||
android-tools
|
|
||||||
|
|
||||||
# GUI shit
|
# GUI shit
|
||||||
element-desktop
|
element-desktop
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,6 @@ unfuck_wallpaper() {
|
||||||
swww img ~/.local/share/bg.png
|
swww img ~/.local/share/bg.png
|
||||||
}
|
}
|
||||||
|
|
||||||
unfuck_fingerprint() {
|
|
||||||
systemctl restart fprintd.service
|
|
||||||
}
|
|
||||||
|
|
||||||
unfuck_bar() {
|
unfuck_bar() {
|
||||||
pkill waybar
|
pkill waybar
|
||||||
setsid waybar &
|
setsid waybar &
|
||||||
|
|
@ -85,7 +81,6 @@ everything)
|
||||||
unfuck_bar
|
unfuck_bar
|
||||||
unfuck_spotify
|
unfuck_spotify
|
||||||
unfuck_wallpaper
|
unfuck_wallpaper
|
||||||
unfuck_fingerprint
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
eval "unfuck_$1"
|
eval "unfuck_$1"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
localVariables = {
|
localVariables = {
|
||||||
# Looks like this: '~/some/path > '
|
# Looks like this: '~/some/path > '
|
||||||
PS1 = "> %F{magenta}%~%f < ";
|
PS1 = "%F{magenta} > %~%f < ";
|
||||||
RPROMPT = "%F{magenta}%m";
|
RPROMPT = "%F{magenta}%m";
|
||||||
# Gets pushed to the home directory otherwise
|
# Gets pushed to the home directory otherwise
|
||||||
LESSHISTFILE = "/dev/null";
|
LESSHISTFILE = "/dev/null";
|
||||||
|
|
|
||||||
|
|
@ -5,24 +5,13 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
mpc
|
|
||||||
mpdris2
|
|
||||||
ncmpcpp
|
|
||||||
rmpc
|
|
||||||
];
|
|
||||||
|
|
||||||
services.mpd = {
|
services.mpd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
musicDirectory = "/home/${username}/Music";
|
musicDirectory = "/home/liv/Music";
|
||||||
playlistDirectory = "/home/${username}/Music/.playlists";
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
restore_paused "yes"
|
|
||||||
auto_update "yes"
|
|
||||||
|
|
||||||
audio_output {
|
audio_output {
|
||||||
type "pipewire"
|
type "pipewire"
|
||||||
name "pipewire"
|
name "pipewire"
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
user = "${username}"; # PipeWire requires this as it runs as the normal user and mpd normally runs as a system user.
|
user = "${username}"; # PipeWire requires this as it runs as the normal user and mpd normally runs as a system user.
|
||||||
|
|
@ -32,6 +21,11 @@
|
||||||
};
|
};
|
||||||
systemd.services.mpd.environment = {
|
systemd.services.mpd.environment = {
|
||||||
# see: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609
|
# see: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609
|
||||||
XDG_RUNTIME_DIR = "/run/user/1000"; # User-id must match above user. MPD will look inside this directory for the PipeWire socket.
|
XDG_RUNTIME_DIR = "/run/user/${toString config.users.users.${username}.uid}"; # User-id must match above user. MPD will look inside this directory for the PipeWire socket.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mpdris2
|
||||||
|
ncmpcpp
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
{
|
|
||||||
makeDesktopItem,
|
|
||||||
copyDesktopItems,
|
|
||||||
fetchFromGitHub,
|
|
||||||
makeWrapper,
|
|
||||||
python3Packages,
|
|
||||||
qt6,
|
|
||||||
ffmpeg,
|
|
||||||
}:
|
|
||||||
python3Packages.buildPythonApplication rec {
|
|
||||||
pname = "onthespot";
|
|
||||||
version = "0.7.1";
|
|
||||||
|
|
||||||
pyproject = true;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "justin025";
|
|
||||||
repo = "onthespot";
|
|
||||||
rev = "refs/tags/v${version}";
|
|
||||||
hash = "sha256-G4c1u7HvTap6iZ2ttGBxhRpYrdICIGXwfgo7Jbmq/R4=";
|
|
||||||
};
|
|
||||||
|
|
||||||
pythonRelaxDeps = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
makeWrapper
|
|
||||||
copyDesktopItems
|
|
||||||
qt6.wrapQtAppsHook
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
|
||||||
qt6.qtbase
|
|
||||||
ffmpeg
|
|
||||||
mutagen
|
|
||||||
googletrans
|
|
||||||
/*
|
|
||||||
(googletrans.overrideAttrs {
|
|
||||||
version = "4.0.2";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "ssut";
|
|
||||||
repo = "py-googletrans";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "0wzzinn0k9rfv9z1gmfk9l4kljyd4n6kizsjw4wjxv91kfhj92hz";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
*/
|
|
||||||
librespot
|
|
||||||
pillow
|
|
||||||
pyperclip
|
|
||||||
pyqt6
|
|
||||||
pyqt6-sip
|
|
||||||
requests
|
|
||||||
setuptools
|
|
||||||
urllib3
|
|
||||||
wheel
|
|
||||||
];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
wrapProgram $out/bin/onthespot \
|
|
||||||
--set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION "python"
|
|
||||||
install -Dm444 $src/src/onthespot/resources/icons/onthespot.png $out/share/icons/hicolor/256x256/apps/onthespot.png
|
|
||||||
'';
|
|
||||||
|
|
||||||
/*
|
|
||||||
preFixup = ''
|
|
||||||
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
|
||||||
'';
|
|
||||||
*/
|
|
||||||
|
|
||||||
desktopItems = [
|
|
||||||
(makeDesktopItem {
|
|
||||||
name = "Onthespot";
|
|
||||||
exec = "onthespot";
|
|
||||||
icon = "onthespot";
|
|
||||||
desktopName = "Onthespot";
|
|
||||||
comment = " QT based Spotify music downloader written in Python";
|
|
||||||
categories = [ "Audio" ];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
||||||
BIN
wallpapers/otherWallpaper/astronaut.png
Normal file
|
After Width: | Height: | Size: 823 KiB |
BIN
wallpapers/otherWallpaper/catppuccin/astronaut.png
Normal file
|
After Width: | Height: | Size: 823 KiB |
BIN
wallpapers/otherWallpaper/catppuccin/cat-leaves.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
wallpapers/otherWallpaper/catppuccin/error.jpg
Normal file
|
After Width: | Height: | Size: 229 KiB |
BIN
wallpapers/otherWallpaper/nixos/nix-colored.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 106 KiB |
BIN
wallpapers/otherWallpaper/nixos/nixos-catppuccin.png
Normal file
|
After Width: | Height: | Size: 239 KiB |
BIN
wallpapers/otherWallpaper/nixos/nixppuccin.png
Normal file
|
After Width: | Height: | Size: 190 KiB |
BIN
wallpapers/otherWallpaper/others/deer-sunset.jpg
Normal file
|
After Width: | Height: | Size: 585 KiB |
BIN
wallpapers/otherWallpaper/others/forrest.png
Normal file
|
After Width: | Height: | Size: 7 MiB |
BIN
wallpapers/otherWallpaper/others/japanees-forest.jpg
Normal file
|
After Width: | Height: | Size: 477 KiB |
|
After Width: | Height: | Size: 3.4 MiB |
BIN
wallpapers/otherWallpaper/others/lake-by-takuya-matsuyama.jpg
Normal file
|
After Width: | Height: | Size: 1 MiB |
BIN
wallpapers/otherWallpaper/others/purplesky.png
Normal file
|
After Width: | Height: | Size: 4.3 MiB |
|
After Width: | Height: | Size: 3.5 MiB |
BIN
wallpapers/otherWallpaper/others/shaded_landscape.jpg
Normal file
|
After Width: | Height: | Size: 3.9 MiB |
BIN
wallpapers/otherWallpaper/others/tree-sunset.jpg
Normal file
|
After Width: | Height: | Size: 259 KiB |
|
After Width: | Height: | Size: 6.3 MiB |
BIN
wallpapers/wallpaper.jpg
Normal file
|
After Width: | Height: | Size: 1 MiB |