diff --git a/etc/apps/dttyper/default.nix b/etc/apps/dttyper/default.nix new file mode 100755 index 0000000..fd52632 --- /dev/null +++ b/etc/apps/dttyper/default.nix @@ -0,0 +1,26 @@ +{ lib, rustPlatform, fetchFromGitea, pkgs, stdenv, ... }: + +rustPlatform.buildRustPackage rec { + pname = "dttyper"; + version = "1.4.0"; + + nativeBuildInputs = lib.optionals stdenv.isLinux [ pkgs.pkg-config ]; + OPENSSL_NO_VENDOR = 1; + buildInputs = lib.optionals stdenv.isLinux [ pkgs.openssl ]; + + src = fetchFromGitea { + domain = "git.berryez.xyz"; + owner = "berry"; + repo = "dttyper"; + rev = "89203be0677520d4e6945254419e7ae7377581ae"; + hash = "sha256-ZlCvMgb8yE3zDmCteyy8XXvgz+clpccV3gtXKHyZGlo="; + }; + + cargoHash = "sha256-dpN7hHpqSur6KjtEikVjQMqnF8PW27ax7ccpQNU5vdA="; + + meta = with lib; { + description = "Terminal-based typing test which exports each test into an influx bd"; + homepage = "https://git.berryez.xyz/berry/dttyper"; + license = licenses.mit; + }; +} diff --git a/etc/apps/firefox.nix b/etc/apps/firefox.nix new file mode 100755 index 0000000..8b13789 --- /dev/null +++ b/etc/apps/firefox.nix @@ -0,0 +1 @@ + diff --git a/etc/apps/goki/default.nix b/etc/apps/goki/default.nix new file mode 100755 index 0000000..251abb8 --- /dev/null +++ b/etc/apps/goki/default.nix @@ -0,0 +1,22 @@ +{ lib, buildGoModule, fetchFromGitHub, pkgs, stdenv, ... }: +buildGoModule rec { + pname = "goki"; + version = "0.1.1"; + + src = fetchFromGitHub + { + owner = "abeleinin"; + repo = "goki"; + rev = "b2c4ee6f0e040ce9ac2b089ab01438066e47bb9f"; + hash = "sha256-ThAQ/VgIBjKyAmo2oZARh3nqo8wB6nuv/HYRCOSbe8U="; + }; + + + vendorHash = "sha256-SCX/eXXnwnCNZ11jw+ZNeJ42HUhI5MnV+AaO89BTKJs="; + + meta = with lib; { + description = "An intelligent flashcard management tool for the terminal! "; + homepage = "https://github.com/abeleinin/goki"; + license = licenses.mit; + }; +} diff --git a/etc/apps/gpu-screen-recorder/default.nix b/etc/apps/gpu-screen-recorder/default.nix new file mode 100755 index 0000000..60c2c67 --- /dev/null +++ b/etc/apps/gpu-screen-recorder/default.nix @@ -0,0 +1,56 @@ +{ stdenv +, lib +, fetchurl +, makeWrapper +, pkgs +}: + +stdenv.mkDerivation { + pname = "gpu-screen-recorder"; + version = "unstable-2023-11-18"; + + # printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + src = fetchurl { + url = "https://dec05eba.com/snapshot/gpu-screen-recorder.git.r418.5a8900e.tar.gz"; + hash = "sha256-Dal6KxQOTqoNH6e8lYk5XEXGFG/vzbguNFZ9yk9nKe0="; + }; + sourceRoot = "."; + + nativeBuildInputs = with pkgs; [ + pkg-config + makeWrapper + ]; + + buildInputs = with pkgs; [ + xorg.libXcomposite + libpulseaudio + ffmpeg + wayland + libdrm + libva + xorg.libXrandr + linuxKernel.packages.linux_xanmod_stable.nvidia_x11 + ]; + + buildPhase = '' + ./build.sh + ''; + + postInstall = '' + install -Dt $out/bin gpu-screen-recorder gsr-kms-server + mkdir $out/bin/.wrapped + mv $out/bin/gpu-screen-recorder $out/bin/.wrapped/ + makeWrapper "$out/bin/.wrapped/gpu-screen-recorder" "$out/bin/gpu-screen-recorder" \ + --prefix LD_LIBRARY_PATH : ${pkgs.libglvnd}/lib \ + --prefix LD_LIBRARY_PATH : ${pkgs.linuxKernel.packages.linux_xanmod_stable.nvidia_x11}/lib \ + --prefix PATH : $out/bin + ''; + + meta = with lib; { + description = "A screen recorder that has minimal impact on system performance by recording a window using the GPU only"; + homepage = "https://git.dec05eba.com/gpu-screen-recorder/about/"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ babbaj ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/etc/apps/music.nix b/etc/apps/music.nix index 51ad841..b168570 100755 --- a/etc/apps/music.nix +++ b/etc/apps/music.nix @@ -4,9 +4,9 @@ playerctl jamesdsp yt-dlp - picard # audio metadata - ncmpc - mpd + #picard # audio metadata + #ncmpc + #mpd ]; home-manager.users.grape = { diff --git a/etc/apps/prod.nix b/etc/apps/prod.nix index 8d88292..a63e274 100755 --- a/etc/apps/prod.nix +++ b/etc/apps/prod.nix @@ -3,7 +3,7 @@ taskwarrior timewarrior logseq - inputs.romodoro.packages.x86_64-linux.default + #inputs.romodoro.packages.x86_64-linux.default taskwarrior-tui inputs.dttyper.packages.x86_64-linux.default ]; diff --git a/etc/apps/romodoro/default.nix b/etc/apps/romodoro/default.nix new file mode 100755 index 0000000..9152c58 --- /dev/null +++ b/etc/apps/romodoro/default.nix @@ -0,0 +1,38 @@ +{ lib, rustPlatform, fetchFromGitea, pkgs, stdenv, ... }: + +rustPlatform.buildRustPackage rec { + pname = "romodoro"; + version = "0.1.4"; + + nativeBuildInputs = [ + # adding unstable rustc + pkgs.unstable.rustc + pkgs.pkg-config + pkgs.git + pkgs.cmake + ]; + + buildInputs = [ + pkgs.alsa-oss + pkgs.alsa-lib.dev + pkgs.alsa-utils + pkgs.git + ]; + + src = fetchFromGitea + { + domain = "git.berryez.xyz"; + owner = "berry"; + repo = "romodoro"; + rev = "11414e11c99bebee6fee1561c5f8158405b05708"; + hash = "sha256-7OnY8pUrDZ26sbpE7Yco6k3UhcB+7Ipd6FskHG97m58="; + }; + + cargoHash = "sha256-FTolAioLPwLoFRWRepdAcirS5zSKKTCGR8qGyevABNA="; + + meta = with lib; { + description = "A TUI pomodoro written in rust"; + homepage = "https://git.berryez.xyz/berry/romodoro"; + license = licenses.mit; + }; +} diff --git a/etc/configs/firewall.nix b/etc/configs/firewall.nix new file mode 100644 index 0000000..15da07b --- /dev/null +++ b/etc/configs/firewall.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: { + networking.firewall = { + #extraCommands = "iptables -I FORWARD default"; + allowedUDPPorts = [ + 34197 #factorio + ]; + }; +} diff --git a/etc/configs/i3.nix b/etc/configs/i3.nix index eaa9933..34221d0 100755 --- a/etc/configs/i3.nix +++ b/etc/configs/i3.nix @@ -8,6 +8,7 @@ in xdotool jq ]; + home-manager.users.grape.xsession.windowManager.i3 = { enable = true; config = { @@ -24,7 +25,10 @@ in command = "picom -b --experimental-backends"; } { - command = "polybar --reload"; + command = "polybar default"; + } + { + command = "polybar bottom"; } ]; # defining alt as modifier diff --git a/etc/configs/ollama.nix b/etc/configs/ollama.nix index 3e6843b..5a0637a 100644 --- a/etc/configs/ollama.nix +++ b/etc/configs/ollama.nix @@ -1,9 +1,7 @@ { pkgs, ... }: { - environment.systemPackages = with pkgs; [ ollama ]; - services.ollama.enable = false; + services.ollama.enable = true; services.ollama.acceleration = "cuda"; - } diff --git a/etc/configs/polybar/top.nix b/etc/configs/polybar/top.nix new file mode 100644 index 0000000..8e64698 --- /dev/null +++ b/etc/configs/polybar/top.nix @@ -0,0 +1,196 @@ +let + colors = { + fg = "#FFFFFF"; + bg = "#191830"; + border = "#F72585"; + warn = "#f00"; + altfg = "#F72585"; + + invisible = "#00400080"; + + currentWorkspace = "#FAD000"; + seperatorColor = "#FAD000"; + }; + script = "~/.config/scripts"; +in +{ + + home-manager.users.grape.services.polybar = { + + config = { + "module/date" = { + type = "internal/date"; + font-1 = "Jetbrains Mono Nerd font"; + interval = 1; + format = "%{T2}%{F${colors.bg}}%{F-}%{T-}