From 332b06fd9baefdfa2b043b8e2c72b8c110940fc5 Mon Sep 17 00:00:00 2001 From: Alexander Kassouni Date: Thu, 27 Aug 2026 23:15:39 -0700 Subject: idk --- users/kassouni/ayu.nix | 156 ---------------------------------- users/kassouni/ayu/ayu-dark.nix | 156 ++++++++++++++++++++++++++++++++++ users/kassouni/claude.nix | 9 ++ users/kassouni/firefox.nix | 26 ++++++ users/kassouni/ghostty.nix | 2 +- users/kassouni/home.nix | 11 +-- users/kassouni/music.nix | 34 ++++++++ users/kassouni/neovim.nix | 4 + users/kassouni/palette/default.nix | 11 ++- users/kassouni/palette/reboot.nix | 12 ++- users/kassouni/palette/rebuild.nix | 20 +++++ users/kassouni/palette/screenshot.nix | 12 ++- users/kassouni/palette/shutdown.nix | 12 ++- users/kassouni/rip.nix | 94 ++++++++++++++++++++ users/kassouni/scripts/default.nix | 8 +- users/kassouni/slippi.nix | 6 ++ 16 files changed, 392 insertions(+), 181 deletions(-) delete mode 100644 users/kassouni/ayu.nix create mode 100644 users/kassouni/ayu/ayu-dark.nix create mode 100644 users/kassouni/claude.nix create mode 100644 users/kassouni/music.nix create mode 100644 users/kassouni/palette/rebuild.nix create mode 100644 users/kassouni/rip.nix create mode 100644 users/kassouni/slippi.nix (limited to 'users/kassouni') diff --git a/users/kassouni/ayu.nix b/users/kassouni/ayu.nix deleted file mode 100644 index 37ff83f..0000000 --- a/users/kassouni/ayu.nix +++ /dev/null @@ -1,156 +0,0 @@ -{ config, lib, ... }: - -with lib; - -{ - options.colorScheme = { - palette = mkOption { - type = types.attrs; - default = { - range = { - min = 0.675; - max = 0.875; - }; - steps = 5; - gray = "#5A6673"; - red = "#F07178"; - pink = "#F29668"; - orange = "#FF8F40"; - peach = "#E6C08A"; - yellow = "#FFB454"; - green = "#AAD94C"; - teal = "#95E6CB"; - indigo = "#39BAE6"; - blue = "#59C2FF"; - purple = "#D2A6FF"; - }; - }; - - syntax = mkOption { - type = types.attrs; - default = { - tag = "#39BAE6"; - func = "#FFB454"; - entity = "#59C2FF"; - string = "#AAD94C"; - regexp = "#95E6CB"; - markup = "#F07178"; - keyword = "#FF8F40"; - special = "#E6C08A"; - comment = "#5A6673"; - constant = "#D2A6FF"; - operator = "#F29668"; - }; - }; - - terminal = mkOption { - type = types.attrs; - default = { - black = "#0A0000"; - red = "#E0656E"; - green = "#9DC842"; - yellow = "#F5A94A"; - blue = "#4FB8F5"; - magenta = "#C89CF5"; - cyan = "#8BDCC1"; - white = "#FFFFFF"; - brightBlack = "#0A0000"; - brightRed = "#F07178"; - brightGreen = "#AAD94C"; - brightYellow = "#FFB454"; - brightBlue = "#59C2FF"; - brightMagenta = "#D2A6FF"; - brightCyan = "#95E6CB"; - brightWhite = "#FFFFFF"; - }; - }; - - vcs = mkOption { - type = types.attrs; - default = { - added = "#70BF56"; - modified = "#73B8FF"; - removed = "#F26D78"; - }; - }; - - surface = mkOption { - type = types.attrs; - default = { - sunk = "#030609"; - base = "#0D1017"; - lift = "#10141C"; - over = "#FFFFFF"; - }; - }; - - editor = mkOption { - type = types.attrs; - default = { - fg = "#BFBDB6"; - bg = "#10141C"; - line = "#161A24"; - selection = { - active = "#3388FF"; - activeAlpha = "#40"; - inactive = "#80B5FF"; - inactiveAlpha = "#26"; - }; - findMatch = { - active = "#4C4126"; - activeAlpha = "#FF"; - inactive = "#4C4126"; - inactiveAlpha = "#80"; - }; - lineNumber = { - active = "#5A6378"; - activeAlpha = "#FF"; - normal = "#5A6378"; - normalAlpha = "#A6"; - }; - indentGuide = { - active = "#5A6378"; - activeAlpha = "#A1"; - normal = "#5A6378"; - normalAlpha = "#42"; - }; - }; - }; - - ui = mkOption { - type = types.attrs; - default = { - fg = "#5A6378"; - bg = "#0D1017"; - line = "#1B1F29"; - selection = { - active = "#475266"; - activeAlpha = "#40"; - normal = "#475266"; - normalAlpha = "#33"; - }; - panel = { - bg = "#141821"; - shadow = "#000000"; - shadowAlpha = "#80"; - }; - popup = { - bg = "#0F131A"; - shadow = "#000000"; - shadowAlpha = "#80"; - }; - }; - }; - - common = mkOption { - type = types.attrs; - default = { - accent = { - tint = "#E6B450"; - on = "#9E7833"; - }; - error = "#D95757"; - }; - }; - }; -} diff --git a/users/kassouni/ayu/ayu-dark.nix b/users/kassouni/ayu/ayu-dark.nix new file mode 100644 index 0000000..37ff83f --- /dev/null +++ b/users/kassouni/ayu/ayu-dark.nix @@ -0,0 +1,156 @@ +{ config, lib, ... }: + +with lib; + +{ + options.colorScheme = { + palette = mkOption { + type = types.attrs; + default = { + range = { + min = 0.675; + max = 0.875; + }; + steps = 5; + gray = "#5A6673"; + red = "#F07178"; + pink = "#F29668"; + orange = "#FF8F40"; + peach = "#E6C08A"; + yellow = "#FFB454"; + green = "#AAD94C"; + teal = "#95E6CB"; + indigo = "#39BAE6"; + blue = "#59C2FF"; + purple = "#D2A6FF"; + }; + }; + + syntax = mkOption { + type = types.attrs; + default = { + tag = "#39BAE6"; + func = "#FFB454"; + entity = "#59C2FF"; + string = "#AAD94C"; + regexp = "#95E6CB"; + markup = "#F07178"; + keyword = "#FF8F40"; + special = "#E6C08A"; + comment = "#5A6673"; + constant = "#D2A6FF"; + operator = "#F29668"; + }; + }; + + terminal = mkOption { + type = types.attrs; + default = { + black = "#0A0000"; + red = "#E0656E"; + green = "#9DC842"; + yellow = "#F5A94A"; + blue = "#4FB8F5"; + magenta = "#C89CF5"; + cyan = "#8BDCC1"; + white = "#FFFFFF"; + brightBlack = "#0A0000"; + brightRed = "#F07178"; + brightGreen = "#AAD94C"; + brightYellow = "#FFB454"; + brightBlue = "#59C2FF"; + brightMagenta = "#D2A6FF"; + brightCyan = "#95E6CB"; + brightWhite = "#FFFFFF"; + }; + }; + + vcs = mkOption { + type = types.attrs; + default = { + added = "#70BF56"; + modified = "#73B8FF"; + removed = "#F26D78"; + }; + }; + + surface = mkOption { + type = types.attrs; + default = { + sunk = "#030609"; + base = "#0D1017"; + lift = "#10141C"; + over = "#FFFFFF"; + }; + }; + + editor = mkOption { + type = types.attrs; + default = { + fg = "#BFBDB6"; + bg = "#10141C"; + line = "#161A24"; + selection = { + active = "#3388FF"; + activeAlpha = "#40"; + inactive = "#80B5FF"; + inactiveAlpha = "#26"; + }; + findMatch = { + active = "#4C4126"; + activeAlpha = "#FF"; + inactive = "#4C4126"; + inactiveAlpha = "#80"; + }; + lineNumber = { + active = "#5A6378"; + activeAlpha = "#FF"; + normal = "#5A6378"; + normalAlpha = "#A6"; + }; + indentGuide = { + active = "#5A6378"; + activeAlpha = "#A1"; + normal = "#5A6378"; + normalAlpha = "#42"; + }; + }; + }; + + ui = mkOption { + type = types.attrs; + default = { + fg = "#5A6378"; + bg = "#0D1017"; + line = "#1B1F29"; + selection = { + active = "#475266"; + activeAlpha = "#40"; + normal = "#475266"; + normalAlpha = "#33"; + }; + panel = { + bg = "#141821"; + shadow = "#000000"; + shadowAlpha = "#80"; + }; + popup = { + bg = "#0F131A"; + shadow = "#000000"; + shadowAlpha = "#80"; + }; + }; + }; + + common = mkOption { + type = types.attrs; + default = { + accent = { + tint = "#E6B450"; + on = "#9E7833"; + }; + error = "#D95757"; + }; + }; + }; +} diff --git a/users/kassouni/claude.nix b/users/kassouni/claude.nix new file mode 100644 index 0000000..d5a9380 --- /dev/null +++ b/users/kassouni/claude.nix @@ -0,0 +1,9 @@ +{ ... }: { + programs.claude-code = { + enable = true; + settings = { + autoMemoryEnabled = false; + model = "opus"; + }; + }; +} diff --git a/users/kassouni/firefox.nix b/users/kassouni/firefox.nix index 42dd583..e1cee19 100644 --- a/users/kassouni/firefox.nix +++ b/users/kassouni/firefox.nix @@ -2,6 +2,32 @@ { programs.firefox = { enable = true; + + policies = { + ExtensionSettings = { + "uBlock0@raymondhill.net" = { + default_area = "navbar"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + installation_mode = "normal_installed"; + private_browsing = true; + }; + + "{d634138d-c276-4fc8-924b-40a0ea21d284}" = { + default_area = "navbar"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/1password-x-password-manager/latest.xpi"; + installation_mode = "normal_installed"; + private_browsing = true; + }; + + "{9063c2e9-e07c-4c2c-9646-cfe7ca8d0498}" = { + default_area = "menupanel"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/old-reddit-redirect/latest.xpi"; + installation_mode = "normal_installed"; + private_browsing = true; + }; + }; + }; + profiles.kassouni = { isDefault = true; bookmarks = { diff --git a/users/kassouni/ghostty.nix b/users/kassouni/ghostty.nix index d70a194..8c4aefd 100644 --- a/users/kassouni/ghostty.nix +++ b/users/kassouni/ghostty.nix @@ -3,7 +3,7 @@ programs.ghostty = { enable = true; settings = { - theme = "Ayu"; + theme = "Ayu Light"; font-family = config.theme.font.family; font-size = 24; window-decoration = "none"; diff --git a/users/kassouni/home.nix b/users/kassouni/home.nix index cfbd86b..dc4675e 100644 --- a/users/kassouni/home.nix +++ b/users/kassouni/home.nix @@ -7,10 +7,14 @@ { imports = [ ./neovim.nix + ./claude.nix ./fuzzel.nix ./rofi.nix + ./music.nix + ./slippi.nix ./ssh.nix - ./ayu.nix + ./rip.nix + ./ayu/ayu-dark.nix ./git.nix ./ghostty.nix ./theme.nix @@ -36,8 +40,7 @@ }; home.packages = with pkgs; [ - vlc - strawberry + dolphin-emu cmus btop wget @@ -48,11 +51,9 @@ bat lsd yazi - claude-code tldr curl _1password-gui - opencode spotify prismlauncher ]; diff --git a/users/kassouni/music.nix b/users/kassouni/music.nix new file mode 100644 index 0000000..65a9edb --- /dev/null +++ b/users/kassouni/music.nix @@ -0,0 +1,34 @@ +{ pkgs, ... }: { + home.packages = with pkgs; [ + cdparanoia-iii + ffmpeg + libgpod + imagemagick + ]; + + programs.beets = { + enable = true; + settings = { + plugins = [ + "convert" + "musicbrainz" + "chroma" + "fetchart" + "embedart" + ]; + + convert = { + format = "flac"; + auto = true; + never_convert_lossy_files = true; + }; + + embedart = { + maxwidth = 500; + }; + + directory = "~/Music/beets/library"; + library = "~/Music/beets/musiclibrary.db"; + }; + }; +} diff --git a/users/kassouni/neovim.nix b/users/kassouni/neovim.nix index ccdc9ca..ec90023 100644 --- a/users/kassouni/neovim.nix +++ b/users/kassouni/neovim.nix @@ -37,6 +37,10 @@ package = null; }; nixd.enable = true; + rust_analyzer = { + enable = true; + package = null; + }; }; }; diff --git a/users/kassouni/palette/default.nix b/users/kassouni/palette/default.nix index 08c68b1..235f774 100644 --- a/users/kassouni/palette/default.nix +++ b/users/kassouni/palette/default.nix @@ -5,17 +5,16 @@ let (builtins.readDir ./.) ); commands = map (file: pkgs.callPackage (./. + "/${file}") { }) commandFiles; - palette = pkgs.symlinkJoin { - name = "palette"; - paths = commands; - }; in { home.packages = [ (pkgs.writers.writeBashBin "open-palette" '' set -eu - choice=$(${pkgs.coreutils}/bin/ls ${palette}/bin | ${pkgs.rofi}/bin/rofi -dmenu -i -p palette) - exec "${palette}/bin/$choice" + exes=(${lib.concatMapStringsSep " " (c: c.exe) commands}) + idx=$(${pkgs.rofi}/bin/rofi -dmenu -i -format i -p palette </jre/lib//server/libjvm.so. On nixpkgs that dir is the `.home` + # attribute (…/lib/openjdk), not the package store root. + bdjJavaHome = bdjJdk.home; + + # libbluray's BD-J classes are Java 1.4 bytecode, so the stock jars load on any + # JVM — no recompile needed. LIBBLURAY_CP must be a SINGLE jar path (the j2se + # jar); libbluray auto-loads the matching AWT jar from the same directory. + # A ':'-joined classpath is treated as one filename and fails to open. + libbluray = pkgs.libbluray-full; + bdjJar = "${libbluray}/share/java/libbluray-j2se-${libbluray.version}.jar"; + + # Wrap every vlc entrypoint so BD-J playback uses jdk8. libbluray keys off + # JAVA_HOME; BDJ_JAVA_HOME is set too for good measure. + vlc-bluray = pkgs.symlinkJoin { + name = "vlc-bluray"; + paths = [ pkgs.vlc ]; + nativeBuildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + for prog in vlc cvlc nvlc qvlc rvlc svlc; do + if [ -e "$out/bin/$prog" ]; then + rm "$out/bin/$prog" + makeWrapper ${pkgs.vlc}/bin/$prog "$out/bin/$prog" \ + --set JAVA_HOME "${bdjJavaHome}" \ + --set BDJ_JAVA_HOME "${bdjJavaHome}" \ + --set LIBBLURAY_CP "${bdjJar}" \ + --prefix PATH : "${bdjJavaHome}/bin" + fi + done + ''; + }; + + # rip.sh, verbatim — wrapped so bd_info/makemkvcon/mkisofs resolve from the + # Nix store instead of the ambient PATH. writeShellApplication supplies the + # shebang + `set -euo pipefail` and shellchecks the body at build time. + rip = pkgs.writeShellApplication { + name = "rip"; + runtimeInputs = [ + libbluray # bd_info + pkgs-unstable.makemkv # makemkvcon + pkgs.cdrkit # mkisofs + pkgs.gawk # awk + pkgs.coreutils # tr, mkdir + ]; + text = '' + # Remove the decrypted backup folder once the ISO exists and is non-empty. + # The ISO wraps the same VIDEO_TS/BDMV payload, so the folder is redundant. + cleanup_backup() { + local backup="$1" iso="$2" + if [[ -s "$iso" ]]; then + rm -rf "$backup" + else + echo "ISO $iso missing or empty; keeping backup folder $backup" >&2 + exit 1 + fi + } + + RIPS_DIR="/home/kassouni/Videos/backups" + + VOLUME_NAME=$(bd_info /dev/sr0 | awk -F': ' '/Volume Identifier/ {print $2}' | tr -d '\r') + + if [[ -z "$VOLUME_NAME" ]]; then + echo "Could not read volume identifier from /dev/sr0 (no disc?)" >&2 + exit 1 + fi + + BACKUP_PATH="$RIPS_DIR/$VOLUME_NAME" + mkdir -p "$BACKUP_PATH" + + makemkvcon backup --decrypt --messages=-stdout --progress=-same disc:/dev/sr0 "$BACKUP_PATH" + + mkisofs -udf -iso-level "3" -allow-limited-size -input-charset "utf-8" -o "$BACKUP_PATH.iso" "$BACKUP_PATH/" + + cleanup_backup "$BACKUP_PATH" "$BACKUP_PATH.iso" + ''; + }; +in +{ + home.packages = with pkgs; [ + rip + cdrkit + libbluray + libaacs + pkgs-unstable.makemkv + udftools + vlc-bluray + bdjJdk + ]; +} diff --git a/users/kassouni/scripts/default.nix b/users/kassouni/scripts/default.nix index 5a74f30..2b86b7e 100644 --- a/users/kassouni/scripts/default.nix +++ b/users/kassouni/scripts/default.nix @@ -7,7 +7,7 @@ date "+%l:%M%p on %A, %B %e, %Y" echo - ${pkgs.util-linux}/bin/cal | ${pkgs.gnugrep}/bin/grep -E "\b$(date '+%e')\b| " + ${pkgs.util-linux}/bin/cal '') (pkgs.writers.writeBashBin "r" '' set -e @@ -16,5 +16,11 @@ cd "$(git rev-parse --show-toplevel)" exec "$@" '') + (pkgs.writers.writeBashBin "serve" '' + set -e + set -u + + ${pkgs.python3}/bin/python -m http.server 8080 + '') ]; } diff --git a/users/kassouni/slippi.nix b/users/kassouni/slippi.nix new file mode 100644 index 0000000..e315220 --- /dev/null +++ b/users/kassouni/slippi.nix @@ -0,0 +1,6 @@ +{ config, ... }: +{ + slippi-launcher = { + isoPath = "${config.home.homeDirectory}/Sync/Games/GC/Super Smash Bros. Melee (v1.02).iso"; + }; +} -- cgit v1.3.1