fix: update system
This commit is contained in:
parent
0aaebc17c8
commit
a642d136c2
9 changed files with 128 additions and 218 deletions
|
|
@ -98,7 +98,6 @@
|
||||||
|
|
||||||
pkgs.parsec-bin
|
pkgs.parsec-bin
|
||||||
pkgs.filezilla
|
pkgs.filezilla
|
||||||
pkgs.ghidra
|
|
||||||
pkgs.zed-editor
|
pkgs.zed-editor
|
||||||
pkgs.openvpn
|
pkgs.openvpn
|
||||||
pkgs.telegram-desktop
|
pkgs.telegram-desktop
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ end
|
||||||
-- make_config(server_name, {})()
|
-- make_config(server_name, {})()
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
|
M.bashls = make_config("bashls", {})
|
||||||
|
|
||||||
M.lua_ls = make_config("lua_ls", {
|
M.lua_ls = make_config("lua_ls", {
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
|
|
@ -125,6 +127,6 @@ M.clangd = make_config("clangd", {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
M.tsserver = make_config("tsserver", {})
|
M.ts_ls = make_config("ts_ls", {})
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ in {
|
||||||
black # Python
|
black # Python
|
||||||
prettierd # Multi-language
|
prettierd # Multi-language
|
||||||
shfmt
|
shfmt
|
||||||
|
shellcheck
|
||||||
isort
|
isort
|
||||||
rustywind
|
rustywind
|
||||||
|
|
||||||
|
|
@ -51,6 +52,7 @@ in {
|
||||||
nodePackages.typescript-language-server
|
nodePackages.typescript-language-server
|
||||||
tailwindcss-language-server
|
tailwindcss-language-server
|
||||||
clang
|
clang
|
||||||
|
bash-language-server
|
||||||
|
|
||||||
# Tools
|
# Tools
|
||||||
git
|
git
|
||||||
|
|
|
||||||
|
|
@ -112,9 +112,6 @@ in {
|
||||||
# border thiccness
|
# border thiccness
|
||||||
border_size = 2;
|
border_size = 2;
|
||||||
|
|
||||||
# whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)
|
|
||||||
apply_sens_to_raw = 0;
|
|
||||||
|
|
||||||
# active border color
|
# active border color
|
||||||
"col.active_border" = "rgb(${rose})";
|
"col.active_border" = "rgb(${rose})";
|
||||||
"col.inactive_border" = "rgb(${muted})";
|
"col.inactive_border" = "rgb(${muted})";
|
||||||
|
|
@ -124,7 +121,7 @@ in {
|
||||||
kb_layout = "us";
|
kb_layout = "us";
|
||||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||||
accel_profile = "flat";
|
accel_profile = "flat";
|
||||||
force_no_accel = true;
|
force_no_accel = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
dwindle = {
|
dwindle = {
|
||||||
|
|
|
||||||
|
|
@ -1,198 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
stdenv,
|
|
||||||
stdenvNoCC,
|
|
||||||
fetchFromGitHub,
|
|
||||||
makeWrapper,
|
|
||||||
makeDesktopItem,
|
|
||||||
copyDesktopItems,
|
|
||||||
electron,
|
|
||||||
libicns,
|
|
||||||
jq,
|
|
||||||
moreutils,
|
|
||||||
cacert,
|
|
||||||
nodePackages,
|
|
||||||
pipewire,
|
|
||||||
libpulseaudio,
|
|
||||||
autoPatchelfHook,
|
|
||||||
withTTS ? true,
|
|
||||||
# Enables the use of vencord from nixpkgs instead of
|
|
||||||
# letting vesktop manage it's own version
|
|
||||||
withSystemVencord ? false,
|
|
||||||
}:
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "vesktop";
|
|
||||||
version = "1.5.3";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "Vencord";
|
|
||||||
repo = "Vesktop";
|
|
||||||
rev = "v${finalAttrs.version}";
|
|
||||||
hash = "sha256-HlT7ddlrMHG1qOCqdaYjuWhJD+5FF1Nkv2sfXLWd07o=";
|
|
||||||
};
|
|
||||||
|
|
||||||
# NOTE: This requires pnpm 8.10.0 or newer
|
|
||||||
# https://github.com/pnpm/pnpm/pull/7214
|
|
||||||
pnpmDeps = assert lib.versionAtLeast nodePackages.pnpm.version "8.10.0";
|
|
||||||
stdenvNoCC.mkDerivation {
|
|
||||||
pname = "${finalAttrs.pname}-pnpm-deps";
|
|
||||||
inherit
|
|
||||||
(finalAttrs)
|
|
||||||
src
|
|
||||||
version
|
|
||||||
ELECTRON_SKIP_BINARY_DOWNLOAD
|
|
||||||
;
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
cacert
|
|
||||||
jq
|
|
||||||
moreutils
|
|
||||||
nodePackages.pnpm
|
|
||||||
];
|
|
||||||
|
|
||||||
# inspired by https://github.com/NixOS/nixpkgs/blob/763e59ffedb5c25774387bf99bc725df5df82d10/pkgs/applications/misc/pot/default.nix#L56
|
|
||||||
# and based on https://github.com/NixOS/nixpkgs/pull/290715
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
pnpm config set store-dir $out
|
|
||||||
# Some packages produce platform dependent outputs. We do not want to cache those in the global store
|
|
||||||
pnpm config set side-effects-cache false
|
|
||||||
# pnpm is going to warn us about using --force
|
|
||||||
# --force allows us to fetch all dependencies including ones that aren't meant for our host platform
|
|
||||||
pnpm install --force --frozen-lockfile --ignore-script
|
|
||||||
|
|
||||||
'';
|
|
||||||
|
|
||||||
fixupPhase = ''
|
|
||||||
runHook preFixup
|
|
||||||
|
|
||||||
# Remove timestamp and sort the json files
|
|
||||||
rm -rf $out/v3/tmp
|
|
||||||
for f in $(find $out -name "*.json"); do
|
|
||||||
sed -i -E -e 's/"checkedAt":[0-9]+,//g' $f
|
|
||||||
jq --sort-keys . $f | sponge $f
|
|
||||||
done
|
|
||||||
|
|
||||||
runHook postFixup
|
|
||||||
'';
|
|
||||||
|
|
||||||
dontConfigure = true;
|
|
||||||
dontBuild = true;
|
|
||||||
outputHashMode = "recursive";
|
|
||||||
outputHash = "sha256-rizJu6v04wFEpJtakC2tfPg/uylz7gAOzJiXvUwdDI4=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
autoPatchelfHook
|
|
||||||
copyDesktopItems
|
|
||||||
makeWrapper
|
|
||||||
nodePackages.pnpm
|
|
||||||
nodePackages.nodejs
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
libpulseaudio
|
|
||||||
pipewire
|
|
||||||
stdenv.cc.cc.lib
|
|
||||||
];
|
|
||||||
|
|
||||||
ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
|
|
||||||
|
|
||||||
configurePhase = ''
|
|
||||||
runHook preConfigure
|
|
||||||
|
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
export STORE_PATH=$(mktemp -d)
|
|
||||||
|
|
||||||
cp -Tr "$pnpmDeps" "$STORE_PATH"
|
|
||||||
chmod -R +w "$STORE_PATH"
|
|
||||||
|
|
||||||
pnpm config set store-dir "$STORE_PATH"
|
|
||||||
pnpm install --frozen-lockfile --ignore-script --offline
|
|
||||||
patchShebangs node_modules/{*,.*}
|
|
||||||
|
|
||||||
runHook postConfigure
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
runHook preBuild
|
|
||||||
|
|
||||||
pnpm build
|
|
||||||
# using `pnpm exec` here apparently makes it ignore ELECTRON_SKIP_BINARY_DOWNLOAD
|
|
||||||
./node_modules/.bin/electron-builder \
|
|
||||||
--dir \
|
|
||||||
-c.asarUnpack="**/*.node" \
|
|
||||||
-c.electronDist=${electron}/libexec/electron \
|
|
||||||
-c.electronVersion=${electron.version}
|
|
||||||
|
|
||||||
runHook postBuild
|
|
||||||
'';
|
|
||||||
|
|
||||||
# this is consistent with other nixpkgs electron packages and upstream, as far as I am aware
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
mkdir -p $out/opt/Vesktop
|
|
||||||
cp -r dist/linux-*unpacked/resources $out/opt/Vesktop/
|
|
||||||
|
|
||||||
pushd build
|
|
||||||
${libicns}/bin/icns2png -x icon.icns
|
|
||||||
for file in icon_*x32.png; do
|
|
||||||
file_suffix=''${file//icon_}
|
|
||||||
install -Dm0644 $file $out/share/icons/hicolor/''${file_suffix//x32.png}/apps/vesktop.png
|
|
||||||
done
|
|
||||||
|
|
||||||
makeWrapper ${electron}/bin/electron $out/bin/vesktop \
|
|
||||||
--add-flags $out/opt/Vesktop/resources/app.asar \
|
|
||||||
${lib.optionalString withTTS "--add-flags \"--enable-speech-dispatcher\""} \
|
|
||||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime}}"
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
desktopItems = [
|
|
||||||
(makeDesktopItem {
|
|
||||||
name = "vesktop";
|
|
||||||
desktopName = "Vesktop";
|
|
||||||
exec = "vesktop %U";
|
|
||||||
icon = "vesktop";
|
|
||||||
startupWMClass = "Vesktop";
|
|
||||||
genericName = "Internet Messenger";
|
|
||||||
keywords = [
|
|
||||||
"discord"
|
|
||||||
"vencord"
|
|
||||||
"electron"
|
|
||||||
"chat"
|
|
||||||
];
|
|
||||||
categories = [
|
|
||||||
"Network"
|
|
||||||
"InstantMessaging"
|
|
||||||
"Chat"
|
|
||||||
];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
inherit (finalAttrs) pnpmDeps;
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "An alternate client for Discord with Vencord built-in";
|
|
||||||
homepage = "https://github.com/Vencord/Vesktop";
|
|
||||||
changelog = "https://github.com/Vencord/Vesktop/releases/tag/${finalAttrs.src.rev}";
|
|
||||||
license = lib.licenses.gpl3Only;
|
|
||||||
maintainers = with lib.maintainers; [
|
|
||||||
getchoo
|
|
||||||
Scrumplex
|
|
||||||
vgskye
|
|
||||||
pluiedev
|
|
||||||
];
|
|
||||||
platforms = [
|
|
||||||
"x86_64-linux"
|
|
||||||
"aarch64-linux"
|
|
||||||
];
|
|
||||||
mainProgram = "vesktop";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/src/main/constants.ts b/src/main/constants.ts
|
|
||||||
index d5c5fa6..a1b32f1 100644
|
|
||||||
--- a/src/main/constants.ts
|
|
||||||
+++ b/src/main/constants.ts
|
|
||||||
@@ -16,7 +16,7 @@ export const VENCORD_THEMES_DIR = join(DATA_DIR, "themes");
|
|
||||||
// needs to be inline require because of circular dependency
|
|
||||||
// as otherwise "DATA_DIR" (which is used by ./settings) will be uninitialised
|
|
||||||
export const VENCORD_FILES_DIR =
|
|
||||||
- (require("./settings") as typeof import("./settings")).Settings.store.vencordDir || join(DATA_DIR, "vencordDist");
|
|
||||||
+ (require("./settings") as typeof import("./settings")).Settings.store.vencordDir || "@vencord@";
|
|
||||||
|
|
||||||
export const USER_AGENT = `Vesktop/${app.getVersion()} (https://github.com/Vencord/Vesktop)`;
|
|
||||||
|
|
||||||
40
packages/zen-browser/default.nix
Normal file
40
packages/zen-browser/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
{pkgs ? import <nixpkgs> {}}: let
|
||||||
|
pname = "zen-browser";
|
||||||
|
version = "1.0.0-a.29";
|
||||||
|
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://github.com/zen-browser/desktop/releases/download/${version}/zen-specific.AppImage";
|
||||||
|
sha256 = "sha256-cB2aJ9awl+gTyBOe0T7wMiZWw7RcwohOuCCdWBJXXwo=";
|
||||||
|
};
|
||||||
|
|
||||||
|
appimageContents = pkgs.appimageTools.extractType2 {
|
||||||
|
inherit pname version src;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
pkgs.appimageTools.wrapType2 rec {
|
||||||
|
inherit pname version src;
|
||||||
|
|
||||||
|
extraInstallCommands = ''
|
||||||
|
mkdir -p $out/share/applications $out/share/pixmaps
|
||||||
|
cp ${appimageContents}/zen.desktop $out/share/applications/
|
||||||
|
cp ${appimageContents}/zen.png $out/share/pixmaps/
|
||||||
|
|
||||||
|
for n in {16,32,48,64,128}; do
|
||||||
|
size=$n"x"$n
|
||||||
|
mkdir -p $out/share/icons/hicolor/$size/apps
|
||||||
|
file="default"$n".png"
|
||||||
|
cp ${appimageContents}/browser/chrome/icons/default/$file $out/share/icons/hicolor/$size/apps/zen.png
|
||||||
|
done
|
||||||
|
|
||||||
|
substituteInPlace $out/share/applications/zen.desktop \
|
||||||
|
--replace-fail "Exec=zen %u" "Exec=$out/bin/${pname} %u"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with pkgs.lib; {
|
||||||
|
description = "Zen Browser - Experience tranquillity while browsing the web without people tracking you.";
|
||||||
|
homepage = "https://github.com/zen-browser/desktop";
|
||||||
|
license = licenses.mpl20;
|
||||||
|
maintainers = with maintainers; [zvictor];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
||||||
81
packages/zen-browser/scripts/patch.sh
Normal file
81
packages/zen-browser/scripts/patch.sh
Normal file
|
|
@ -0,0 +1,81 @@
|
||||||
|
ENGINE_DIR=$(pwd)/engine
|
||||||
|
SRC_DIR=$(pwd)/src
|
||||||
|
|
||||||
|
# Create a directory if it doesn't exist
|
||||||
|
mkdirp() {
|
||||||
|
mkdir -p "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Append to a file
|
||||||
|
append_to_file_sync() {
|
||||||
|
local file="$1"
|
||||||
|
local text="$2"
|
||||||
|
echo -e "$text" >>"$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copy or symlink files
|
||||||
|
copy_manual() {
|
||||||
|
local name="$1"
|
||||||
|
local src_path="$SRC_DIR/$name"
|
||||||
|
local dest_path="$ENGINE_DIR/$name"
|
||||||
|
|
||||||
|
echo "Processing file: $name"
|
||||||
|
|
||||||
|
# Ensure the parent directory exists
|
||||||
|
mkdirp "$(dirname "$dest_path")"
|
||||||
|
|
||||||
|
# Remove existing non-symlink file
|
||||||
|
if [ -e "$dest_path" ] && [ ! -L "$dest_path" ]; then
|
||||||
|
echo "Removing existing file at $dest_path"
|
||||||
|
rm -f "$dest_path"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(uname)" = "Darwin" ] || [ "$(uname)" = "Linux" ]; then
|
||||||
|
# Create symlink
|
||||||
|
echo "Creating symlink: $src_path -> $dest_path"
|
||||||
|
ln -s "$src_path" "$dest_path"
|
||||||
|
else
|
||||||
|
# On Windows or other platforms without symlink permissions
|
||||||
|
echo "Copying file: $src_path -> $dest_path"
|
||||||
|
cp "$src_path" "$dest_path"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add to .gitignore if not already present
|
||||||
|
if ! grep -q "$name" "$ENGINE_DIR/.gitignore"; then
|
||||||
|
echo "Adding $name to .gitignore"
|
||||||
|
append_to_file_sync "$ENGINE_DIR/.gitignore" "\n$name"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Apply folder patches
|
||||||
|
apply_folder_patches() {
|
||||||
|
# Get all files from the source directory, excluding .patch files and node_modules
|
||||||
|
local all_files=($(find "$SRC_DIR" -type f ! -name "*.patch" ! -path "*/node_modules/*"))
|
||||||
|
|
||||||
|
for file in "${all_files[@]}"; do
|
||||||
|
relative_path="${file#$SRC_DIR/}"
|
||||||
|
copy_manual "$relative_path"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Apply internal patches
|
||||||
|
apply_internal_patches() {
|
||||||
|
for patch in $(find $PATCHES_DIR -type f -name "*.patch"); do
|
||||||
|
echo "Applying internal patch: $patch"
|
||||||
|
git apply --directory "$ENGINE_DIR" "$patch"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Apply git patches
|
||||||
|
apply_git_patches() {
|
||||||
|
for patch in $(find $SRC_DIR -type f -name "*.patch"); do
|
||||||
|
echo "Applying git patch: $patch $ENGINE_DIR"
|
||||||
|
echo "git apply --directory "$ENGINE_DIR" "$patch""
|
||||||
|
git apply --verbose "$patch"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
cd engine || exit
|
||||||
|
apply_git_patches
|
||||||
|
cd .. || exit
|
||||||
|
apply_folder_patches
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.BeatSaberModManager
|
pkgs.BeatSaberModManager
|
||||||
pkgs.sbctl
|
pkgs.sbctl
|
||||||
pkgs.custom.vesktop
|
pkgs.vesktop
|
||||||
pkgs.mangohud
|
pkgs.mangohud
|
||||||
pkgs.transmission_4
|
pkgs.transmission_4
|
||||||
inputs.agenix.packages.${system}.agenix
|
inputs.agenix.packages.${system}.agenix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue