1
0
Fork 0
mirror of https://git.sr.ht/~azikx/karbur synced 2024-10-30 07:26:20 +00:00

update 

This commit is contained in:
azikx 2024-10-21 19:33:43 +09:00
parent 7ed33c8747
commit 0ffbf8f9b4
14 changed files with 350 additions and 54 deletions

View file

@ -668,6 +668,22 @@
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1729256560,
"narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
@ -704,7 +720,8 @@
"spicetify-nix": "spicetify-nix",
"stylix": "stylix",
"walls": "walls",
"yazi": "yazi"
"yazi": "yazi",
"zen-browser": "zen-browser"
}
},
"rust-overlay": {
@ -966,6 +983,24 @@
"repo": "yazi",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1729379852,
"narHash": "sha256-QM0JYrrilWjbg66F8ypx/SNko+Km0Bds1k9ZeKjl5OE=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "9f97fb1c01fc76da9834a09443806166d346a7d6",
"type": "github"
},
"original": {
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"type": "github"
}
}
},
"root": "root",

View file

@ -20,6 +20,7 @@
# ONE LINE SOFTWARE
ayugram-desktop.url = "github:kaeeraa/ayugram-desktop/release?submodules=1";
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
zen-browser.url = "github:0xc000022070/zen-browser-flake";
stylix.url = "github:danth/stylix";
yazi.url = "github:sxyazi/yazi";

View file

@ -2,6 +2,7 @@
home.packages = with pkgs;
[
(callPackage ./anicliru/anicli-ru.nix { })
# (callPackage ./vivaldi/default.nix { })
# (callPackage ./torrserver/default.nix { })
];
}

View file

@ -0,0 +1,174 @@
{ lib, stdenv, fetchurl, zlib, libX11, libXext, libSM, libICE, libxkbcommon
, libxshmfence, libXfixes, libXt, libXi, libXcursor, libXScrnSaver
, libXcomposite, libXdamage, libXtst, libXrandr, alsa-lib, dbus, cups, libexif
, ffmpeg, systemd, libva, libGL, freetype, fontconfig, libXft, libXrender
, libxcb, expat, libuuid, libxml2, glib, gtk3, pango, gdk-pixbuf, cairo, atk
, at-spi2-atk, at-spi2-core, qt5, libdrm, mesa, vulkan-loader, nss, nspr
, patchelf, makeWrapper, wayland, pipewire, isSnapshot ? false
, proprietaryCodecs ? false, vivaldi-ffmpeg-codecs ? null
, enableWidevine ? false, widevine-cdm ? null, commandLineArgs ? ""
, pulseSupport ? stdenv.hostPlatform.isLinux, libpulseaudio
, kerberosSupport ? true, libkrb5 }:
let
branch = if isSnapshot then "snapshot" else "stable";
vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi";
in stdenv.mkDerivation rec {
pname = "vivaldi";
version = "6.10.3494.33-1";
suffix = {
aarch64-linux = "arm64";
x86_64-linux = "amd64";
}.${stdenv.hostPlatform.system} or (throw
"Unsupported system: ${stdenv.hostPlatform.system}");
src = fetchurl {
url =
"https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}_${suffix}.deb";
hash = {
aarch64-linux = "sha256-p+MihnvnVBVcsYE/7vp9b6T2bxp7cAiCq9ME+NHqi38=";
x86_64-linux = "sha256-/izigAT9eqhgxgYosMoDoPIA0rOCeYOotEjaigBTazk=";
}.${stdenv.hostPlatform.system} or (throw
"Unsupported system: ${stdenv.hostPlatform.system}");
};
unpackPhase = ''
ar vx $src
tar -xvf data.tar.xz
'';
nativeBuildInputs = [ patchelf makeWrapper ];
dontWrapQtApps = true;
buildInputs = [
stdenv.cc.cc
stdenv.cc.libc
zlib
libX11
libXt
libXext
libSM
libICE
libxcb
libxkbcommon
libxshmfence
libXi
libXft
libXcursor
libXfixes
libXScrnSaver
libXcomposite
libXdamage
libXtst
libXrandr
atk
at-spi2-atk
at-spi2-core
alsa-lib
dbus
cups
gtk3
gdk-pixbuf
libexif
ffmpeg
systemd
libva
qt5.qtbase
freetype
fontconfig
libXrender
libuuid
expat
glib
nss
nspr
libGL
libxml2
pango
cairo
libdrm
mesa
vulkan-loader
wayland
pipewire
] ++ lib.optional proprietaryCodecs vivaldi-ffmpeg-codecs
++ lib.optional pulseSupport libpulseaudio
++ lib.optional kerberosSupport libkrb5;
libPath = lib.makeLibraryPath buildInputs
+ lib.optionalString (stdenv.hostPlatform.is64bit)
(":" + lib.makeSearchPathOutput "lib" "lib64" buildInputs)
+ ":$out/opt/${vivaldiName}/lib";
buildPhase = ''
runHook preBuild
echo "Patching Vivaldi binaries"
for f in chrome_crashpad_handler vivaldi-bin vivaldi-sandbox ; do
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}" \
opt/${vivaldiName}/$f
done
for f in libGLESv2.so libqt5_shim.so ; do
patchelf --set-rpath "${libPath}" opt/${vivaldiName}/$f
done
'' + lib.optionalString proprietaryCodecs ''
ln -s ${vivaldi-ffmpeg-codecs}/lib/libffmpeg.so opt/${vivaldiName}/libffmpeg.so.''${version%\.*\.*}
'' + ''
echo "Finished patching Vivaldi binaries"
runHook postBuild
'';
dontPatchELF = true;
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p "$out"
cp -r opt "$out"
mkdir "$out/bin"
ln -s "$out/opt/${vivaldiName}/${vivaldiName}" "$out/bin/vivaldi"
mkdir -p "$out/share"
cp -r usr/share/{applications,xfce4} "$out"/share
substituteInPlace "$out"/share/applications/*.desktop \
--replace /usr/bin/${vivaldiName} "$out"/bin/vivaldi
substituteInPlace "$out"/share/applications/*.desktop \
--replace vivaldi-stable vivaldi
local d
for d in 16 22 24 32 48 64 128 256; do
mkdir -p "$out"/share/icons/hicolor/''${d}x''${d}/apps
ln -s \
"$out"/opt/${vivaldiName}/product_logo_''${d}.png \
"$out"/share/icons/hicolor/''${d}x''${d}/apps/vivaldi.png
done
wrapProgram "$out/bin/vivaldi" \
--add-flags ${lib.escapeShellArg commandLineArgs} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
--set-default FONTCONFIG_FILE "${fontconfig.out}/etc/fonts/fonts.conf" \
--set-default FONTCONFIG_PATH "${fontconfig.out}/etc/fonts" \
--suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/ \
${
lib.optionalString enableWidevine
"--suffix LD_LIBRARY_PATH : ${libPath}"
}
'' + lib.optionalString enableWidevine ''
ln -sf ${widevine-cdm}/share/google/chrome/WidevineCdm $out/opt/${vivaldiName}/WidevineCdm
'' + ''
runHook postInstall
'';
passthru.updateScript = ./update-vivaldi.sh;
meta = with lib; {
description = "Browser for our Friends, powerful and personal";
homepage = "https://vivaldi.com";
license = licenses.unfree;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
mainProgram = "vivaldi";
maintainers = with maintainers; [ otwieracz badmutex azikx ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
};
}

View file

@ -0,0 +1,56 @@
{ lib, stdenv, fetchurl, autoPatchelfHook }:
let
version = "twilight";
hash = "sha256-WDygG9aGnD20nGxtG0t+T2KEwbJ+fZ0uRaCndirrsXI=";
in stdenv.mkDerivation {
pname = "zen-browser";
src = fetchTarball {
url =
"https://github.com/zen-browser/desktop/releases/download/${version}/zen.linux-specific.tar.bz2";
sha256 = "sha256:0jkzdrsd1qdw3pwdafnl5xb061vryxzgwmvp1a6ghdwgl2dm2fcz";
};
phases = [ "installPhase" "fixupPhase" ];
installPhase = ''
mkdir -p $out/bin && cp -r $src/* $out/bin
install -D $desktopSrc/zen.desktop $out/share/applications/zen.desktop
install -D $src/browser/chrome/icons/default/default128.png $out/share/icons/hicolor/128x128/apps/zen.png
'';
fixupPhase = ''
chmod 755 $out/bin/*
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/zen
wrapProgram $out/bin/zen --set LD_LIBRARY_PATH "${
pkgs.lib.makeLibraryPath runtimeLibs
}" \
--set MOZ_LEGACY_PROFILES 1 --set MOZ_ALLOW_DOWNGRADE 1 --set MOZ_APP_LAUNCHER zen --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/zen-bin
wrapProgram $out/bin/zen-bin --set LD_LIBRARY_PATH "${
pkgs.lib.makeLibraryPath runtimeLibs
}" \
--set MOZ_LEGACY_PROFILES 1 --set MOZ_ALLOW_DOWNGRADE 1 --set MOZ_APP_LAUNCHER zen --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/glxtest
wrapProgram $out/bin/glxtest --set LD_LIBRARY_PATH "${
pkgs.lib.makeLibraryPath runtimeLibs
}"
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/updater
wrapProgram $out/bin/updater --set LD_LIBRARY_PATH "${
pkgs.lib.makeLibraryPath runtimeLibs
}"
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/vaapitest
wrapProgram $out/bin/vaapitest --set LD_LIBRARY_PATH "${
pkgs.lib.makeLibraryPath runtimeLibs
}"
'';
desktopSrc = ./.;
meta = with lib; {
description = "Torrserver";
homepage = "https://github.com/YouROK/TorrServer";
license = licenses.unlicense;
meta.platforms = platforms.all;
mainProgram = "torrserver";
};
}

View file

@ -2,7 +2,7 @@
imports = [
./spotify
./obs-studio
./ayugram
# ./ayugram
# ./firefox
./floorp
./qbittorrent

View file

@ -1,4 +1,16 @@
{ pkgs, ... }: {
{ pkgs, ... }:
let
fsr = pkgs.fetchurl {
url =
"https://gist.githubusercontent.com/agyild/82219c545228d70c5604f865ce0b0ce5/raw/2623d743b9c23f500ba086f05b385dcb1557e15d/FSR.glsl";
hash = "sha256-VthZf8a3v20T+MOyvfHNxDsGF11RdGqrRM8dyhaSm54=";
};
cas = pkgs.fetchurl {
url =
"https://gist.githubusercontent.com/agyild/bbb4e58298b2f86aa24da3032a0d2ee6/raw/10e4ca1b6ef173b64391ce2c81b9a95fcd095931/CAS-scaled.glsl";
hash = "sha256-/meKu4Iecvg58/OmrwEFxUOhqdmubJJxhc/UAM66shc=";
};
in {
programs.mpv = {
enable = true;
scripts = with pkgs.mpvScripts; [ thumbnail sponsorblock-minimal ];
@ -79,6 +91,8 @@
CTRL+4 no-osd change-list glsl-shaders set "${pkgs.anime4k}/Anime4K_Clamp_Highlights.glsl:${pkgs.anime4k}/Anime4K_Restore_CNN_VL.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_VL.glsl:${pkgs.anime4k}/Anime4K_Restore_CNN_M.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode A+A (HQ)"
CTRL+5 no-osd change-list glsl-shaders set "${pkgs.anime4k}/Anime4K_Clamp_Highlights.glsl:${pkgs.anime4k}/Anime4K_Restore_CNN_Soft_VL.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_VL.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${pkgs.anime4k}/Anime4K_Restore_CNN_Soft_M.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode B+B (HQ)"
CTRL+6 no-osd change-list glsl-shaders set "${pkgs.anime4k}/Anime4K_Clamp_Highlights.glsl:${pkgs.anime4k}/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${pkgs.anime4k}/Anime4K_Restore_CNN_M.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode C+A (HQ)"
CTRL+7 no-osd change-list glsl-shaders set "${fsr}"; show-text "FSR applyed"
CTRL+7 no-osd change-list glsl-shaders set "${cas}"; show-text "CAS applyed"
CTRL+0 no-osd change-list glsl-shaders clr ""; show-text "GLSL shaders cleared"
'';

View file

@ -5,6 +5,7 @@
vesktop
tor-browser
qbittorrent-enhanced
obsidian
xdg-user-dirs
onlyoffice-bin
@ -12,26 +13,21 @@
nemo-with-extensions
nemo-fileroller
nemo-emblems
swayimg
gvfs
obsidian
logseq
popsicle
ventoy
swayimg
anime4k
bottles
cartridges
mangohud
steam-tui
(prismlauncher.override {
jdks = [ temurin-bin-21 temurin-bin-17 temurin-bin-8 ];
})
inputs.zen-browser.packages."${system}".specific
inputs.ayugram-desktop.packages.${pkgs.system}.default
];
}

View file

@ -1,5 +1,7 @@
{ pkgs, config, ... }:
let hmdir = config.home.homeDirectory;
let
hmdir = config.home.homeDirectory;
ds = "desktop";
in {
xdg = {
portal = {
@ -12,14 +14,22 @@ in {
};
mime = { enable = true; };
mimeApps = {
# defaultApplications = {
# "default-web-browser" = [ "floorp.desktop" ];
# "text/html" = [ "floorp.desktop" ];
# "x-scheme-handler/http" = [ "floorp.desktop" ];
# "x-scheme-handler/https" = [ "floorp.desktop" ];
# "x-scheme-handler/about" = [ "floorp.desktop" ];
# "x-scheme-handler/unknown" = [ "floorp.desktop" ];
# };
enable = true;
defaultApplications = {
# DEFAULTS
"default-web-browser" = [ "zen.${ds}" ];
# FILE FORMATS
"image/*" = [ "swayimg.${ds}" ];
"video/*" = [ "mpv.${ds}" ];
"text/*" = [ "Helix.${ds}" ];
# OTHERS
"inode/x-empty" = [ "Helix.${ds}" ];
"application/json" = [ "Helix.${ds}" ];
"x-scheme-handler/http" = [ "zen.${ds}" ];
"x-scheme-handler/https" = [ "zen.${ds}" ];
"x-scheme-handler/about" = [ "zen.${ds}" ];
"x-scheme-handler/unknown" = [ "zen.${ds}" ];
};
};
userDirs = {
enable = true;

View file

@ -2,7 +2,7 @@
imports = [
./starship.nix
# ./zsh
./zsh
./fish
];
}

View file

@ -1,20 +1,25 @@
{ pkgs, ... }:
{
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
completionInit = "autoload -U compinit && compinit";
zplug = {
enable = true;
plugins = [
{ name = "nix-community/nix-zsh-completions"; }
{ name = " jnooree/zoxide-zsh-completion"; }
{ name = "toku-sa-n/zsh-dot-up"; }
{ name = "anatolykopyl/doas-zsh-plugin"; }
{ name = " zshzoo/cd-ls"; }
];
};
};
{ pkgs, ... }: {
programs.zsh = {
enable = true;
# COOL TOOLS YEYE
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
# SETS
history.size = 10000;
defaultKeymap = "vicmd";
completionInit = "autoload -U compinit && compinit";
plugins = [
{
name = "vi-mode";
src = pkgs.zsh-vi-mode;
file = "share/zsh-vi-mode/zsh-vi-mode.zsh";
}
{
name = "zsh-bd";
src = pkgs.zsh-bd;
file = "share/zsh-bd/bd.zsh";
}
];
};
}

View file

@ -1,5 +1,13 @@
{ pkgs, config, ... }: {
wayland.windowManager.hyprland.settings = with pkgs; {
{ ... }:
let
workspaces = builtins.concatLists (builtins.genList (x:
let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
in [
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
]) 10);
in {
wayland.windowManager.hyprland.settings = {
# SHORTCUTS
"$m" = "SUPER";
"$s" = "SHIFT";
@ -63,8 +71,8 @@
"$m, V, exec, ayugram-desktop"
"$m $s, V, exec, vesktop"
"$m, B, exec, floorp"
"$m $s, B, exec, firefox"
"$m, B, exec, zen"
"$m $s, B, exec, floorp"
"$m, N, exec, kitty -T Explorer yazi"
"$m $s, N, exec, kitty --class=tfm -T Explorer yazi"
@ -89,12 +97,7 @@
"$s, $p, exec, grimblast copysave output $(xdg-user-dir PICTURES)/$(date +'scr_%d-%m-%y|%H:%M:%S.png')"
"$a, $p, exec, grimblast copysave active $(xdg-user-dir PICTURES)/$(date +'scr_%d-%m-%y|%H:%M:%S.png')"
"$a $s, $p, exec, hyprpicker -a"
] ++ (builtins.concatLists (builtins.genList (i:
let ws = i + 1;
in [
"$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
]) 9));
] ++ workspaces;
# HOLDING BUTTONS
binde = [
@ -154,8 +157,5 @@
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioMicMute, exec, fixf4=$(cat /sys/class/leds/platform::micmute/brightness); echo $((1-fixf4)) | doas tee /sys/class/leds/platform::micmute/brightness; wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
];
bindl = [
# ", switch:on:Lid Switch, exec, hyprctl keyword input:kb_variant = us && hyprlock"
];
};
}

View file

@ -1,5 +1,5 @@
{ pkgs, inputs, config, ... }: {
wayland.windowManager.hyprland = with config.lib.stylix.colors; {
{ pkgs, inputs, ... }: {
wayland.windowManager.hyprland = {
plugins = with inputs; [ hyprfocus.packages.${pkgs.system}.default ];
settings.plugin = {
# FOCUS
@ -8,6 +8,7 @@
animate_floating = "yes";
animate_workspacechange = "yes";
focus_animation = "focus";
# ANIMATIONS STYLE
bezier = [
"bezIn, 0.5,0.0,1.0,0.5"
"bezOut, 0.0,0.5,0.5,1.0"
@ -16,6 +17,7 @@
"smoothIn, 0.25, 1, 0.5, 1"
"realsmooth, 0.28,0.29,.69,1.08"
];
# FLASH MODE
flash = {
flash_opacity = 0.95;
in_bezier = "realsmooth";
@ -23,6 +25,7 @@
out_bezier = "realsmooth";
out_speed = 3;
};
# SHRINK MODE
shrink = {
shrink_percentage = 0.95;
in_bezier = "realsmooth";

View file

@ -4,6 +4,7 @@
# WORKSPACE RULES
"workspace 2 silent, class:^(firefox)$"
"workspace 2 silent, class:^(floorp)$"
"workspace 2 silent, class:^(zen-alpha)$"
"workspace 3 silent, class:^(Spotify)$"
"workspace 4 silent, class:^(com.ayugram)$"
"workspace 4 silent, class:^(vesktop)$"