diff --git a/install.sh b/install.sh index 6340070..a2fbffa 100755 --- a/install.sh +++ b/install.sh @@ -1,35 +1,34 @@ #!/usr/bin/env bash init() { - # Vars - CURRENT_USERNAME='frostphoenix' + # Vars + CURRENT_USERNAME='frostphoenix' - # Colors - NORMAL=$(tput sgr0) - WHITE=$(tput setaf 7) - BLACK=$(tput setaf 0) - RED=$(tput setaf 1) - GREEN=$(tput setaf 2) - YELLOW=$(tput setaf 3) - BLUE=$(tput setaf 4) - MAGENTA=$(tput setaf 5) - CYAN=$(tput setaf 6) - BRIGHT=$(tput bold) - UNDERLINE=$(tput smul) + # Colors + NORMAL=$(tput sgr0) + WHITE=$(tput setaf 7) + BLACK=$(tput setaf 0) + RED=$(tput setaf 1) + GREEN=$(tput setaf 2) + YELLOW=$(tput setaf 3) + BLUE=$(tput setaf 4) + MAGENTA=$(tput setaf 5) + CYAN=$(tput setaf 6) + BRIGHT=$(tput bold) + UNDERLINE=$(tput smul) } confirm() { - echo -en "[${GREEN}y${NORMAL}/${RED}n${NORMAL}]: " - read -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]] - then - exit 0 - fi + echo -en "[${GREEN}y${NORMAL}/${RED}n${NORMAL}]: " + read -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + exit 0 + fi } print_header() { - echo -E "$CYAN + echo -E "$CYAN _____ _ ____ _ _ | ___| __ ___ ___| |_| _ \| |__ ___ ___ _ __ (_)_ __ | |_ | '__/ _ \/ __| __| |_) | '_ \ / _ \ / _ \ '_ \| \ \/ / @@ -50,85 +49,77 @@ print_header() { } get_username() { - echo -en "Enter your$GREEN username$NORMAL : $YELLOW" - read username - echo -en "$NORMAL" - echo -en "Use$YELLOW "$username"$NORMAL as ${GREEN}username${NORMAL} ? " - confirm + echo -en "Enter your$GREEN username$NORMAL : $YELLOW" + read username + echo -en "$NORMAL" + echo -en "Use$YELLOW "$username"$NORMAL as ${GREEN}username${NORMAL} ? " + confirm } set_username() { - 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" ./flake.nix + sed -i -e "s/${CURRENT_USERNAME}/${username}/g" ./modules/home/audacious/config } get_host() { - 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 - echo + 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 + echo - if [[ $REPLY =~ ^[Dd]$ ]]; then - HOST='desktop' - elif [[ $REPLY =~ ^[Ll]$ ]]; then - HOST='laptop' - elif [[ $REPLY =~ ^[Vv]$ ]]; then - HOST='vm' - else - echo "Invalid choice. Please select 'D' for desktop, 'L' for laptop or 'V' for virtual machine." - exit 1 - fi - - echo -en "$NORMAL" - echo -en "Use the$YELLOW "$HOST"$NORMAL ${GREEN}host${NORMAL} ? " - confirm + if [[ $REPLY =~ ^[Dd]$ ]]; then + HOST='desktop' + elif [[ $REPLY =~ ^[Ll]$ ]]; then + HOST='laptop' + elif [[ $REPLY =~ ^[Vv]$ ]]; then + HOST='vm' + else + echo "Invalid choice. Please select 'D' for desktop, 'L' for laptop or 'V' for virtual machine." + exit 1 + fi + + echo -en "$NORMAL" + echo -en "Use the$YELLOW "$HOST"$NORMAL ${GREEN}host${NORMAL} ? " + confirm } install() { - echo -e "\n${RED}START INSTALL PHASE${NORMAL}\n" - sleep 0.2 + echo -e "\n${RED}START INSTALL PHASE${NORMAL}\n" + sleep 0.2 - # Create basic directories - echo -e "Creating folders:" - echo -e " - ${MAGENTA}~/Music${NORMAL}" - echo -e " - ${MAGENTA}~/Documents${NORMAL}" - echo -e " - ${MAGENTA}~/Pictures/wallpapers/others${NORMAL}" - mkdir -p ~/Music - mkdir -p ~/Documents - mkdir -p ~/Pictures/wallpapers/others - sleep 0.2 + # Create basic directories + echo -e "Creating folders:" + echo -e " - ${MAGENTA}~/Music${NORMAL}" + echo -e " - ${MAGENTA}~/Documents${NORMAL}" + echo -e " - ${MAGENTA}~/Pictures/wallpapers/others${NORMAL}" + mkdir -p ~/Music + mkdir -p ~/Documents + mkdir -p ~/Pictures/wallpapers/others + sleep 0.2 - # Copy the wallpapers - echo -e "Copying all ${MAGENTA}wallpapers${NORMAL}" - cp -r wallpapers/wallpaper.png ~/Pictures/wallpapers - 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 + # Get the hardware configuration + echo -e "Copying ${MAGENTA}/etc/nixos/hardware-configuration.nix${NORMAL} to ${MAGENTA}./hosts/${HOST}/${NORMAL}\n" + cp /etc/nixos/hardware-configuration.nix hosts/${HOST}/hardware-configuration.nix + sleep 0.2 - # Get the hardware configuration - echo -e "Copying ${MAGENTA}/etc/nixos/hardware-configuration.nix${NORMAL} to ${MAGENTA}./hosts/${HOST}/${NORMAL}\n" - cp /etc/nixos/hardware-configuration.nix hosts/${HOST}/hardware-configuration.nix - sleep 0.2 + # Last Confirmation + echo -en "You are about to start the system build, do you want to process ? " + confirm - # Last Confirmation - echo -en "You are about to start the system build, do you want to process ? " - confirm - - # Build the system (flakes + home manager) - echo -e "\nBuilding the system...\n" - sudo nixos-rebuild switch --flake .#${HOST} + # Build the system (flakes + home manager) + echo -e "\nBuilding the system...\n" + sudo nixos-rebuild switch --flake .#${HOST} } main() { - init + init - print_header + print_header - get_username - set_username - get_host + get_username + set_username + get_host - install + install } main && exit 0 diff --git a/modules/home/hyprland/config.nix b/modules/home/hyprland/config.nix index 94a37a1..a014d1e 100644 --- a/modules/home/hyprland/config.nix +++ b/modules/home/hyprland/config.nix @@ -71,7 +71,8 @@ "waybar &" "swaync &" "wl-paste --watch cliphist store &" - "yubikey-touch-detector --libnotify" + "yubikey-touch-detector --libnotify &" + "mpDris2 &" ]; input = { @@ -171,7 +172,7 @@ }; animations = { - enabled = true; + enabled = false; bezier = [ "fluent_decel, 0, 0.2, 0.4, 1" diff --git a/modules/home/packages.nix b/modules/home/packages.nix index dde1cc9..4ac677b 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -29,7 +29,6 @@ vimv iamb pass - pixcat lm_sensors neofetch hyfetch @@ -56,6 +55,11 @@ rustc wikit reader + nmap + speedtest-go + delta + powertop + android-tools # GUI shit element-desktop diff --git a/modules/home/scripts/scripts/unfuck.sh b/modules/home/scripts/scripts/unfuck.sh index fc07b19..d49273e 100644 --- a/modules/home/scripts/scripts/unfuck.sh +++ b/modules/home/scripts/scripts/unfuck.sh @@ -25,6 +25,10 @@ unfuck_wallpaper() { swww img ~/.local/share/bg.png } +unfuck_fingerprint() { + systemctl restart fprintd.service +} + unfuck_bar() { pkill waybar setsid waybar & @@ -81,6 +85,7 @@ everything) unfuck_bar unfuck_spotify unfuck_wallpaper + unfuck_fingerprint ;; *) eval "unfuck_$1" diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix index c2e442f..d771fdc 100644 --- a/modules/home/zsh.nix +++ b/modules/home/zsh.nix @@ -16,7 +16,7 @@ localVariables = { # Looks like this: '~/some/path > ' - PS1 = "%F{magenta} > %~%f < "; + PS1 = "> %F{magenta}%~%f < "; RPROMPT = "%F{magenta}%m"; # Gets pushed to the home directory otherwise LESSHISTFILE = "/dev/null"; diff --git a/modules/services/mpd.nix b/modules/services/mpd.nix index 232ef62..ab504ce 100644 --- a/modules/services/mpd.nix +++ b/modules/services/mpd.nix @@ -5,13 +5,24 @@ ... }: { + environment.systemPackages = with pkgs; [ + mpc + mpdris2 + ncmpcpp + rmpc + ]; + services.mpd = { enable = true; - musicDirectory = "/home/liv/Music"; + musicDirectory = "/home/${username}/Music"; + playlistDirectory = "/home/${username}/Music/.playlists"; extraConfig = '' + restore_paused "yes" + auto_update "yes" + audio_output { 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. @@ -21,11 +32,6 @@ }; systemd.services.mpd.environment = { # see: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609 - 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. + XDG_RUNTIME_DIR = "/run/user/1000"; # User-id must match above user. MPD will look inside this directory for the PipeWire socket. }; - - environment.systemPackages = with pkgs; [ - mpdris2 - ncmpcpp - ]; } diff --git a/pkgs/onthespot/default.nix b/pkgs/onthespot/default.nix new file mode 100644 index 0000000..f6ce61d --- /dev/null +++ b/pkgs/onthespot/default.nix @@ -0,0 +1,81 @@ +{ + 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" ]; + }) + ]; +} diff --git a/wallpapers/otherWallpaper/astronaut.png b/wallpapers/otherWallpaper/astronaut.png deleted file mode 100644 index add3369..0000000 Binary files a/wallpapers/otherWallpaper/astronaut.png and /dev/null differ diff --git a/wallpapers/otherWallpaper/catppuccin/astronaut.png b/wallpapers/otherWallpaper/catppuccin/astronaut.png deleted file mode 100644 index add3369..0000000 Binary files a/wallpapers/otherWallpaper/catppuccin/astronaut.png and /dev/null differ diff --git a/wallpapers/otherWallpaper/catppuccin/cat-leaves.png b/wallpapers/otherWallpaper/catppuccin/cat-leaves.png deleted file mode 100644 index ace8c2c..0000000 Binary files a/wallpapers/otherWallpaper/catppuccin/cat-leaves.png and /dev/null differ diff --git a/wallpapers/otherWallpaper/catppuccin/error.jpg b/wallpapers/otherWallpaper/catppuccin/error.jpg deleted file mode 100644 index 04b0588..0000000 Binary files a/wallpapers/otherWallpaper/catppuccin/error.jpg and /dev/null differ diff --git a/wallpapers/otherWallpaper/nixos/nix-colored.png b/wallpapers/otherWallpaper/nixos/nix-colored.png deleted file mode 100644 index 7b5094e..0000000 Binary files a/wallpapers/otherWallpaper/nixos/nix-colored.png and /dev/null differ diff --git a/wallpapers/otherWallpaper/nixos/nixos-catppuccin-center-small.png b/wallpapers/otherWallpaper/nixos/nixos-catppuccin-center-small.png deleted file mode 100644 index a76555e..0000000 Binary files a/wallpapers/otherWallpaper/nixos/nixos-catppuccin-center-small.png and /dev/null differ diff --git a/wallpapers/otherWallpaper/nixos/nixos-catppuccin.png b/wallpapers/otherWallpaper/nixos/nixos-catppuccin.png deleted file mode 100644 index aa0e2ab..0000000 Binary files a/wallpapers/otherWallpaper/nixos/nixos-catppuccin.png and /dev/null differ diff --git a/wallpapers/otherWallpaper/nixos/nixppuccin.png b/wallpapers/otherWallpaper/nixos/nixppuccin.png deleted file mode 100644 index a1d07e4..0000000 Binary files a/wallpapers/otherWallpaper/nixos/nixppuccin.png and /dev/null differ diff --git a/wallpapers/otherWallpaper/others/deer-sunset.jpg b/wallpapers/otherWallpaper/others/deer-sunset.jpg deleted file mode 100644 index b66b752..0000000 Binary files a/wallpapers/otherWallpaper/others/deer-sunset.jpg and /dev/null differ diff --git a/wallpapers/otherWallpaper/others/forrest.png b/wallpapers/otherWallpaper/others/forrest.png deleted file mode 100644 index 1dd7d34..0000000 Binary files a/wallpapers/otherWallpaper/others/forrest.png and /dev/null differ diff --git a/wallpapers/otherWallpaper/others/japanees-forest.jpg b/wallpapers/otherWallpaper/others/japanees-forest.jpg deleted file mode 100644 index 0be1396..0000000 Binary files a/wallpapers/otherWallpaper/others/japanees-forest.jpg and /dev/null differ diff --git a/wallpapers/otherWallpaper/others/jonny-gios-JmNBY1QEpvE-unsplash.jpg b/wallpapers/otherWallpaper/others/jonny-gios-JmNBY1QEpvE-unsplash.jpg deleted file mode 100644 index 5db5f6c..0000000 Binary files a/wallpapers/otherWallpaper/others/jonny-gios-JmNBY1QEpvE-unsplash.jpg and /dev/null differ diff --git a/wallpapers/otherWallpaper/others/lake-by-takuya-matsuyama.jpg b/wallpapers/otherWallpaper/others/lake-by-takuya-matsuyama.jpg deleted file mode 100644 index 1cbf408..0000000 Binary files a/wallpapers/otherWallpaper/others/lake-by-takuya-matsuyama.jpg and /dev/null differ diff --git a/wallpapers/otherWallpaper/others/purplesky.png b/wallpapers/otherWallpaper/others/purplesky.png deleted file mode 100644 index 95eadea..0000000 Binary files a/wallpapers/otherWallpaper/others/purplesky.png and /dev/null differ diff --git a/wallpapers/otherWallpaper/others/s-tsuchiya-F0yjJuDXBcg-unsplash.jpg b/wallpapers/otherWallpaper/others/s-tsuchiya-F0yjJuDXBcg-unsplash.jpg deleted file mode 100644 index fe74c96..0000000 Binary files a/wallpapers/otherWallpaper/others/s-tsuchiya-F0yjJuDXBcg-unsplash.jpg and /dev/null differ diff --git a/wallpapers/otherWallpaper/others/shaded_landscape.jpg b/wallpapers/otherWallpaper/others/shaded_landscape.jpg deleted file mode 100644 index 181c23b..0000000 Binary files a/wallpapers/otherWallpaper/others/shaded_landscape.jpg and /dev/null differ diff --git a/wallpapers/otherWallpaper/others/tree-sunset.jpg b/wallpapers/otherWallpaper/others/tree-sunset.jpg deleted file mode 100644 index 51abb11..0000000 Binary files a/wallpapers/otherWallpaper/others/tree-sunset.jpg and /dev/null differ diff --git a/wallpapers/otherWallpaper/others/yuriy-vertikov-ABJVRfz-PHQ-unsplash.jpg b/wallpapers/otherWallpaper/others/yuriy-vertikov-ABJVRfz-PHQ-unsplash.jpg deleted file mode 100644 index 32588c2..0000000 Binary files a/wallpapers/otherWallpaper/others/yuriy-vertikov-ABJVRfz-PHQ-unsplash.jpg and /dev/null differ diff --git a/wallpapers/wallpaper.jpg b/wallpapers/wallpaper.jpg deleted file mode 100644 index 1cbf408..0000000 Binary files a/wallpapers/wallpaper.jpg and /dev/null differ