1
0

pkgs/chromium-incognito: add package

This commit is contained in:
clerie 2024-03-17 14:24:06 +01:00
parent a15527caf8
commit 5b8b8f8cab
4 changed files with 39 additions and 0 deletions

View File

@ -112,6 +112,7 @@
};
in {
inherit (pkgs)
chromium-incognito
iot-data
nixfiles-add-secret
nixfiles-auto-install

View File

@ -25,6 +25,7 @@
nmap
okular
chromium-incognito
];
# Wireshark

View File

@ -0,0 +1,36 @@
{ pkgs, ... }:
let
chromium-incognito-wrapper = pkgs.writeScriptBin "chromium" ''
${pkgs.ungoogled-chromium}/bin/chromium --incognito "$@"
'';
in pkgs.stdenv.mkDerivation {
pname = "chromium-incognito";
version = "0.1.0";
src = pkgs.writeTextDir "chromium-incognito.desktop" ''
[Desktop Entry]
Version=1.0
Name=Chromium Incognito
Exec=${chromium-incognito-wrapper}/bin/chromium %U
StartupNotify=true
Terminal=false
Icon=chromium
Type=Application
Categories=Network;WebBrowser;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
Actions=new-private-window;
[Desktop Action new-private-window]
Name=New Incognito Window
Exec=${chromium-incognito-wrapper}/bin/chromium
'';
buildPhase = ''
mkdir -p $out/bin
ln -s ${chromium-incognito-wrapper}/bin/chromium $out/bin
install -D chromium-incognito.desktop $out/share/applications/chromium-incognito.desktop
ln -s ${pkgs.ungoogled-chromium}/share/icons $out/share
'';
meta.mainProgram = "chromium";
}

View File

@ -1,4 +1,5 @@
final: prev: {
chromium-incognito = final.callPackage ./chromium-incognito {};
iot-data = final.python3.pkgs.callPackage ./iot-data {};
nixfiles-add-secret = final.callPackage ./nixfiles/nixfiles-add-secret.nix {};
nixfiles-auto-install = final.callPackage ./nixfiles/nixfiles-auto-install.nix {};