1
0

Compare commits

...

2 Commits

Author SHA1 Message Date
7b67445838 pkgs/chromium-incognito: Use writeShellScriptBin 2024-03-17 14:33:57 +01:00
5b8b8f8cab pkgs/chromium-incognito: add package 2024-03-17 14:24:06 +01:00
4 changed files with 39 additions and 0 deletions

View File

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

View File

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

View File

@ -0,0 +1,36 @@
{ pkgs, ... }:
let
chromium-incognito-wrapper = pkgs.writeShellScriptBin "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-window;
[Desktop Action new-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: { final: prev: {
chromium-incognito = final.callPackage ./chromium-incognito {};
iot-data = final.python3.pkgs.callPackage ./iot-data {}; iot-data = final.python3.pkgs.callPackage ./iot-data {};
nixfiles-add-secret = final.callPackage ./nixfiles/nixfiles-add-secret.nix {}; nixfiles-add-secret = final.callPackage ./nixfiles/nixfiles-add-secret.nix {};
nixfiles-auto-install = final.callPackage ./nixfiles/nixfiles-auto-install.nix {}; nixfiles-auto-install = final.callPackage ./nixfiles/nixfiles-auto-install.nix {};