From 332b06fd9baefdfa2b043b8e2c72b8c110940fc5 Mon Sep 17 00:00:00 2001 From: Alexander Kassouni Date: Thu, 27 Aug 2026 23:15:39 -0700 Subject: idk --- TODO.md | 3 + flake.lock | 149 +++++++++++++++++++++++++++----- flake.nix | 20 +++++ machines/hierophant/configuration.nix | 50 +++++++++-- 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 ++ 20 files changed, 586 insertions(+), 209 deletions(-) create mode 100644 TODO.md 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 diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..7f6066f --- /dev/null +++ b/TODO.md @@ -0,0 +1,3 @@ +# TODO + +- [ ] tailscale is not declarative diff --git a/flake.lock b/flake.lock index 143758a..bf9fb94 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -26,11 +42,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1769996383, - "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", + "lastModified": 1785627969, + "narHash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", + "rev": "427bf4bd9435fdf21321c8cc628c24efc14c0f7a", "type": "github" }, "original": { @@ -39,6 +55,51 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "slippi", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1742649964, + "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "slippi", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -46,11 +107,11 @@ ] }, "locked": { - "lastModified": 1783740085, - "narHash": "sha256-qajyHfZY29G2oEQk+uHxmsJcRoBUBXP9maTpFlwP/dI=", + "lastModified": 1785119570, + "narHash": "sha256-Rgs2xKnGLFWQscxUaXX07oyZeuMDOHEbqDOsgliLFGM=", "owner": "nix-community", "repo": "home-manager", - "rev": "3cd22efe6471dc7365c822bd9ad73a21e55f38fb", + "rev": "d4fd24667c8cbef124bb70a20380cab75ec8474d", "type": "github" }, "original": { @@ -62,11 +123,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1784011430, - "narHash": "sha256-lDebytrYdd47IBLwvNOD+6AGeoqZ78CIKlp70hzW280=", + "lastModified": 1786089803, + "narHash": "sha256-ZuvZfVW2tB5tXYEcpcfhVXB3N4OhdZLOqOviy4OD4b4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8eeec934ae0dbeca3d7868c059568a65c08b2fc3", + "rev": "ee48b147c18c7de1e6ec97dc74792be42724bed1", "type": "github" }, "original": { @@ -78,11 +139,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1769909678, - "narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=", + "lastModified": 1785031560, + "narHash": "sha256-OmshNvn2vupOFpYinLUu+1Dnpu4n7Q5N3ggGVNHpkUI=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "72716169fe93074c333e8d0173151350670b824c", + "rev": "0e79af5e3d4dcfcd676ab5ba3f95d2e3352e078c", "type": "github" }, "original": { @@ -91,6 +152,22 @@ "type": "github" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1786106723, + "narHash": "sha256-zDSUbpoeo/9ZmD2+wXnzxoo1+uhL8vxc0b8yuYMKYq0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f13ff45afd1bb73e640eaa08a7066dbed07e3238", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1781216227, @@ -109,11 +186,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1784120854, - "narHash": "sha256-KesHgItiZPgGX740axSiQLcIQ8D24MDqNpkKYWIek8k=", + "lastModified": 1785318670, + "narHash": "sha256-dN6Ou5x/+23FZLEpYP3IffO+NyJFzUlGumt1uu3MMaY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "753cc8a3a87467296ddd1fa93f0cc3e81120ee46", + "rev": "0954f7ee2f6bb3dc7d4e3d0d8bcb8fd4bde4cfc5", "type": "github" }, "original": { @@ -125,11 +202,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1771848320, - "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "lastModified": 1787360063, + "narHash": "sha256-dt4WdcvsA8/RCe+VZZwqU0X+XMM3wBbGCWA0/sFWzGo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "rev": "2c423e03bbafcff28bfadc6781a4a8257f205cb5", "type": "github" }, "original": { @@ -164,8 +241,10 @@ "inputs": { "home-manager": "home-manager", "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim", "sidra": "sidra", + "slippi": "slippi", "xmonad-config": "xmonad-config" } }, @@ -174,11 +253,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1784302039, - "narHash": "sha256-uRjqY4XymGneNy2Yyr58QWwjzn7QjgAWBHh4kLU6684=", + "lastModified": 1785827118, + "narHash": "sha256-tS2eSSpa1uLPUyIAJBpf00+A9KSHpC92gKMLavmHuio=", "owner": "wimpysworld", "repo": "sidra", - "rev": "ead49318a80150a1e8e565ec236b6770b5c702d5", + "rev": "0597e5438fe98fef935cb528c2c9aa5db60171c9", "type": "github" }, "original": { @@ -187,6 +266,30 @@ "type": "github" } }, + "slippi": { + "inputs": { + "git-hooks": "git-hooks", + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1784166278, + "narHash": "sha256-TSvk8AK8ACGTSeC2v/tyWX3UiiaEQ5O4nX5jqVtEEEI=", + "owner": "lytedev", + "repo": "slippi-nix", + "rev": "d87fef3580e6afc19bc3fffbba61069df2452cbf", + "type": "github" + }, + "original": { + "owner": "lytedev", + "repo": "slippi-nix", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, @@ -208,8 +311,8 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1784875697, - "narHash": "sha256-ueJpwT4JUqMwYUWJ6eHBDblK5YfgclshvlQTu2T62ck=", + "lastModified": 1787544164, + "narHash": "sha256-ez8+EU0G06ITmoAr3ubNGbYpIKf4Gl+QiX31Eu6B6l4=", "path": "/home/kassouni/Developer/xmonad-config", "type": "path" }, diff --git a/flake.nix b/flake.nix index 404cfbe..847d3ab 100644 --- a/flake.nix +++ b/flake.nix @@ -3,21 +3,27 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager.url = "github:nix-community/home-manager/release-26.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; nixvim.url = "github:nix-community/nixvim/nixos-26.05"; xmonad-config.url = "path:/home/kassouni/Developer/xmonad-config"; sidra.url = "github:wimpysworld/sidra"; + slippi.url = "github:lytedev/slippi-nix"; + slippi.inputs.nixpkgs.follows = "nixpkgs"; + slippi.inputs.home-manager.follows = "home-manager"; }; outputs = { self, nixpkgs, + nixpkgs-unstable, home-manager, nixvim, xmonad-config, sidra, + slippi, ... }@inputs: let @@ -34,19 +40,33 @@ nixosConfigurations = { hierophant = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + specialArgs = { + pkgs-unstable = import nixpkgs-unstable { + system = "x86_64-linux"; + config.allowUnfree = true; + }; + }; modules = [ ./machines/hierophant/configuration.nix ./machines/hierophant/hardware-configuration.nix xmonad-config.nixosModules.default + slippi.nixosModules.default home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { + pkgs-unstable = import nixpkgs-unstable { + system = "x86_64-linux"; + config.allowUnfree = true; + }; + }; home-manager.users.kassouni = { pkgs, ... }: { imports = [ ./users/kassouni/home.nix nixvim.homeModules.nixvim xmonad-config.homeManagerModules.default + slippi.homeManagerModules.default ]; home.packages = [ sidra.packages.${pkgs.system}.default ]; }; diff --git a/machines/hierophant/configuration.nix b/machines/hierophant/configuration.nix index a37166e..a9a8d2c 100644 --- a/machines/hierophant/configuration.nix +++ b/machines/hierophant/configuration.nix @@ -6,6 +6,7 @@ config, lib, pkgs, + pkgs-unstable, ... }: @@ -19,17 +20,42 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + boot.kernelModules = [ "sg" ]; + + virtualisation.docker = { + enable = true; + }; nix.settings.experimental-features = [ "nix-command" "flakes" ]; - services.tailscale.enable = true; - services.tailscale.extraSetFlags = [ "--ssh" ]; + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + + services.printing = { + enable = true; + drivers = with pkgs; [ + cups-filters + cups-browsed + ]; + }; + + services.ipp-usb.enable = true; services.gnome.gnome-keyring.enable = true; + services.tailscale = { + package = pkgs-unstable.tailscale; + enable = true; + extraSetFlags = [ "--ssh" ]; + extraDaemonFlags = [ "--no-logs-no-support" ]; + }; + nixpkgs.config.allowUnfree = true; hardware.graphics.enable = true; @@ -39,9 +65,11 @@ programs.steam.enable = true; - services.displayManager.sddm.enable = true; + services.displayManager.ly.enable = true; + services.displayManager.ly.x11Support = true; + services.xserver.displayManager.sessionCommands = '' - xrandr --output DP-4 --mode 3840x2160 --rate 159.98 + xrandr --output DP-0 --mode 3840x2160 --rate 159.98 ''; networking.hostName = "hierophant"; # Define your hostname. @@ -74,10 +102,22 @@ # Enable sound. # services.pulseaudio.enable = true; # OR + + security.rtkit.enable = true; + services.pipewire = { enable = true; pulse.enable = true; alsa.enable = true; + extraConfig.pipewire."10-clock-rates" = { + "context.properties" = { + "default.clock.rate" = 48000; + "default.clock.allowed-rates" = [ + 44100 + 48000 + ]; + }; + }; }; # Enable touchpad support (enabled default in most desktopManager). @@ -90,6 +130,7 @@ extraGroups = [ "wheel" "video" + "docker" "input" "audio" ]; # Enable 'sudo' for the user. @@ -99,7 +140,6 @@ dejavu_fonts ]; - programs.firefox.enable = true; # List packages installed in system profile. # You can use https://search.nixos.org/ to find more packages (and options). 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