summaryrefslogtreecommitdiff
path: root/users/kassouni
diff options
context:
space:
mode:
Diffstat (limited to 'users/kassouni')
-rw-r--r--users/kassouni/ayu/ayu-dark.nix (renamed from users/kassouni/ayu.nix)0
-rw-r--r--users/kassouni/claude.nix9
-rw-r--r--users/kassouni/firefox.nix26
-rw-r--r--users/kassouni/ghostty.nix2
-rw-r--r--users/kassouni/home.nix11
-rw-r--r--users/kassouni/music.nix34
-rw-r--r--users/kassouni/neovim.nix4
-rw-r--r--users/kassouni/palette/default.nix11
-rw-r--r--users/kassouni/palette/reboot.nix12
-rw-r--r--users/kassouni/palette/rebuild.nix20
-rw-r--r--users/kassouni/palette/screenshot.nix12
-rw-r--r--users/kassouni/palette/shutdown.nix12
-rw-r--r--users/kassouni/rip.nix94
-rw-r--r--users/kassouni/scripts/default.nix8
-rw-r--r--users/kassouni/slippi.nix6
15 files changed, 236 insertions, 25 deletions
diff --git a/users/kassouni/ayu.nix b/users/kassouni/ayu/ayu-dark.nix
index 37ff83f..37ff83f 100644
--- a/users/kassouni/ayu.nix
+++ b/users/kassouni/ayu/ayu-dark.nix
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 <<EOF
+${lib.concatMapStrings (c: "${c.icon} ${c.name}\n") commands}EOF
+ )
+ exec "''${exes[$idx]}"
'')
];
}
diff --git a/users/kassouni/palette/reboot.nix b/users/kassouni/palette/reboot.nix
index 0b5d51f..bc25ef4 100644
--- a/users/kassouni/palette/reboot.nix
+++ b/users/kassouni/palette/reboot.nix
@@ -1,5 +1,9 @@
{ writers, systemd }:
-writers.writeBashBin "reboot" ''
- set -eu
- ${systemd}/bin/systemctl reboot
-''
+{
+ name = "reboot";
+ icon = "󰑐";
+ exe = writers.writeBash "reboot" ''
+ set -eu
+ exec ${systemd}/bin/systemctl reboot
+ '';
+}
diff --git a/users/kassouni/palette/rebuild.nix b/users/kassouni/palette/rebuild.nix
new file mode 100644
index 0000000..e42a7c5
--- /dev/null
+++ b/users/kassouni/palette/rebuild.nix
@@ -0,0 +1,20 @@
+{ writers, ghostty }:
+{
+ name = "rebuild";
+ icon = "󱄅";
+ # Rebuilds need a terminal: sudo prompts for a password and nixos-rebuild
+ # streams a lot of output. Spawn ghostty with a login shell so it inherits
+ # the system sudo (setuid) and the user's nix from PATH. Mirrors `make rebuild`.
+ exe = writers.writeBash "rebuild" ''
+ set -eu
+ exec ${ghostty}/bin/ghostty -e bash -lc '
+ set -eu
+ cd /home/kassouni/Developer/nixos-config
+ nix flake update xmonad-config
+ sudo nixos-rebuild switch --flake .
+ echo
+ echo "Rebuild finished. Press enter to close."
+ read -r _
+ '
+ '';
+}
diff --git a/users/kassouni/palette/screenshot.nix b/users/kassouni/palette/screenshot.nix
index 2190024..6f2beea 100644
--- a/users/kassouni/palette/screenshot.nix
+++ b/users/kassouni/palette/screenshot.nix
@@ -1,5 +1,9 @@
{ writers, maim, xclip }:
-writers.writeBashBin "screenshot" ''
- set -eu
- ${maim}/bin/maim -s | ${xclip}/bin/xclip -selection clipboard -t image/png
-''
+{
+ name = "screenshot";
+ icon = "󰹑";
+ exe = writers.writeBash "screenshot" ''
+ set -eu
+ ${maim}/bin/maim -s | ${xclip}/bin/xclip -selection clipboard -t image/png
+ '';
+}
diff --git a/users/kassouni/palette/shutdown.nix b/users/kassouni/palette/shutdown.nix
index 919cf0a..2db9425 100644
--- a/users/kassouni/palette/shutdown.nix
+++ b/users/kassouni/palette/shutdown.nix
@@ -1,5 +1,9 @@
{ writers, systemd }:
-writers.writeBashBin "shutdown" ''
- set -eu
- ${systemd}/bin/systemctl poweroff
-''
+{
+ name = "shutdown";
+ icon = "󰐥";
+ exe = writers.writeBash "shutdown" ''
+ set -eu
+ exec ${systemd}/bin/systemctl poweroff
+ '';
+}
diff --git a/users/kassouni/rip.nix b/users/kassouni/rip.nix
new file mode 100644
index 0000000..4fd8f76
--- /dev/null
+++ b/users/kassouni/rip.nix
@@ -0,0 +1,94 @@
+{ pkgs, pkgs-unstable, ... }:
+let
+ # Java 8 is the runtime that drives libbluray's BD-J menus; 17/21 hit
+ # reflection/AWT failures in disc Xlets.
+ bdjJdk = pkgs.jdk8;
+ # libbluray reads JAVA_HOME and locates the JVM at
+ # <home>/jre/lib/<arch>/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";
+ };
+}