Initial commit

This commit is contained in:
2026-02-28 22:43:58 +01:00
commit d7660146e7
4 changed files with 300 additions and 0 deletions

61
flake.lock generated Normal file
View File

@@ -0,0 +1,61 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1772173633,
"narHash": "sha256-MOH58F4AIbCkh6qlQcwMycyk5SWvsqnS/TCfnqDlpj4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c0f3d81a7ddbc2b1332be0d8481a672b4f6004d6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1769909678,
"narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "72716169fe93074c333e8d0173151350670b824c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

25
flake.nix Normal file
View File

@@ -0,0 +1,25 @@
{
description = "Custom packages for kiri's lux configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
];
perSystem =
{ pkgs, ... }:
{
packages = {
helium = pkgs.callPackage ./pkgs/helium.nix { };
zen-browser = pkgs.callPackage ./pkgs/zen-browser.nix { };
};
};
};
}

99
pkgs/helium.nix Normal file
View File

@@ -0,0 +1,99 @@
{
lib,
unzip,
autoPatchelfHook,
stdenv,
fetchurl,
libxcb,
libx11,
libxcomposite,
libxdamage,
libxext,
libxfixes,
libxrandr,
libgbm,
cairo,
libudev-zero,
libxkbcommon,
nspr,
nss,
pango,
qt5,
alsa-lib,
cups,
atk,
at-spi2-core,
at-spi2-atk,
}:
stdenv.mkDerivation rec {
name = "Helium";
version = "0.9.4.1";
src = fetchurl {
url = "https://github.com/imputnet/helium-linux/releases/download/${version}/helium-${version}-x86_64_linux.tar.xz";
sha256 = "sha256-qXuDUtank46O87jASxczmVMk0iD4JaZi2j9LSBe9VCM=";
};
nativeBuildInputs = [
unzip
autoPatchelfHook
qt5.wrapQtAppsHook
];
autoPatchelfIgnoreMissingDeps = [
"libQt6Core.so.6"
"libQt6Gui.so.6"
"libQt6Widgets.so.6"
];
runtimeDependencies = [ ];
buildInputs = [
libxcb
libx11
libxcomposite
libxdamage
libxext
libxfixes
libxrandr
libgbm
cairo
pango
libudev-zero
libxkbcommon
nspr
nss
alsa-lib
cups
atk
at-spi2-core
at-spi2-atk
qt5.qtbase
qt5.qttools
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mv * $out/bin/
mkdir -p $out/share/applications
cat <<INI> $out/share/applications/${name}.desktop
[Desktop Entry]
Name=${name}
GenericName=Web Browser
Terminal=false
Icon=$out/bin/product_logo_256.png
Exec=$out/bin/helium
Type=Application
Categories=Network;WebBrowser;
INI
'';
meta = with lib; {
homepage = "https://github.com/imputnet/helium-linux";
description = "A description of your application";
platforms = platforms.linux;
mainProgram = "helium";
};
}

115
pkgs/zen-browser.nix Normal file
View File

@@ -0,0 +1,115 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
alsa-lib,
atk,
at-spi2-atk,
at-spi2-core,
cairo,
cups,
dbus,
fontconfig,
freetype,
gdk-pixbuf,
glib,
gtk3,
libGL,
libX11,
libXcomposite,
libXdamage,
libXext,
libXfixes,
libXrandr,
libxcb,
libxkbcommon,
mesa,
nspr,
nss,
pango,
systemd,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "zen-browser";
version = "1.19b";
src = fetchurl {
url = "https://github.com/zen-browser/desktop/releases/download/${version}/zen.linux-x86_64.tar.xz";
sha256 = "sha256-C9kieXWSSwKhswRVE2BVMHjlgv+a747uHqDKhqYfjgM=";
};
nativeBuildInputs = [
autoPatchelfHook
wrapGAppsHook3
];
buildInputs = [
alsa-lib
atk
at-spi2-atk
at-spi2-core
cairo
cups
dbus
fontconfig
freetype
gdk-pixbuf
glib
gtk3
libGL
libX11
libXcomposite
libXdamage
libXext
libXfixes
libXrandr
libxcb
libxkbcommon
mesa
nspr
nss
pango
systemd
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/lib/zen-browser
cp -r * $out/lib/zen-browser/
# Create the main executable script that wraps the browser
cat <<EOF > $out/bin/zen-browser
#!/bin/sh
exec $out/lib/zen-browser/zen "\$@"
EOF
chmod +x $out/bin/zen-browser
# Setup the desktop file
mkdir -p $out/share/applications $out/share/pixmaps
cp browser/chrome/icons/default/default128.png $out/share/pixmaps/zen-browser.png
cat <<EOF > $out/share/applications/zen-browser.desktop
[Desktop Entry]
Name=Zen Browser
GenericName=Web Browser
Exec=$out/bin/zen-browser %u
Icon=$out/share/pixmaps/zen-browser.png
Terminal=false
Type=Application
Categories=Network;WebBrowser;
EOF
runHook postInstall
'';
meta = with lib; {
description = "Experience tranquillity while browsing the web without people tracking you!";
homepage = "https://github.com/zen-browser/desktop";
platforms = platforms.linux;
mainProgram = "zen-browser";
};
}