From 21034a5a36d62fbad795c4139c98c32e0516ec93 Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Wed, 1 Mar 2023 13:50:55 +0100 Subject: restructure pkgs --- pkgs/css/lineAwesome/default.nix | 19 --- pkgs/default.nix | 64 ++++---- pkgs/firefoxAddons/addons.json | 16 ++ pkgs/firefoxAddons/default.nix | 182 +++++++++++++++++++++ pkgs/fontMetadata/fontawesome.nix | 16 -- pkgs/fontMetadata/materialDesignIcons.nix | 17 -- pkgs/gitignore/default.nix | 16 -- pkgs/icons/default.nix | 15 -- pkgs/icons/generate-package.sh | 11 -- pkgs/icons/icons.txt | 3 - pkgs/mozilla/addons/addons.json | 16 -- pkgs/mozilla/addons/default.nix | 182 --------------------- pkgs/mozilla/user-js/arkenfox.nix | 8 - pkgs/mozilla/user-js/thunderbird.nix | 8 - pkgs/static/css/lineAwesome/default.nix | 19 +++ pkgs/static/fontMetadata/fontawesome/default.nix | 16 ++ .../fontMetadata/materialDesignIcons/default.nix | 17 ++ pkgs/static/gitignore/default.nix | 12 ++ pkgs/static/gitignore/sources.json | 6 + pkgs/static/icons/default.nix | 15 ++ pkgs/static/icons/generate.sh | 12 ++ pkgs/static/icons/urls.txt | 3 + pkgs/static/userjs/arkenfox/default.nix | 8 + pkgs/static/userjs/thunderbird/default.nix | 8 + pkgs/static/wallpapers/default.nix | 22 +++ pkgs/static/wallpapers/sources.json | 12 ++ 26 files changed, 379 insertions(+), 344 deletions(-) delete mode 100644 pkgs/css/lineAwesome/default.nix create mode 100644 pkgs/firefoxAddons/addons.json create mode 100644 pkgs/firefoxAddons/default.nix delete mode 100644 pkgs/fontMetadata/fontawesome.nix delete mode 100644 pkgs/fontMetadata/materialDesignIcons.nix delete mode 100644 pkgs/gitignore/default.nix delete mode 100644 pkgs/icons/default.nix delete mode 100755 pkgs/icons/generate-package.sh delete mode 100644 pkgs/icons/icons.txt delete mode 100644 pkgs/mozilla/addons/addons.json delete mode 100644 pkgs/mozilla/addons/default.nix delete mode 100644 pkgs/mozilla/user-js/arkenfox.nix delete mode 100644 pkgs/mozilla/user-js/thunderbird.nix create mode 100644 pkgs/static/css/lineAwesome/default.nix create mode 100644 pkgs/static/fontMetadata/fontawesome/default.nix create mode 100644 pkgs/static/fontMetadata/materialDesignIcons/default.nix create mode 100644 pkgs/static/gitignore/default.nix create mode 100644 pkgs/static/gitignore/sources.json create mode 100644 pkgs/static/icons/default.nix create mode 100755 pkgs/static/icons/generate.sh create mode 100644 pkgs/static/icons/urls.txt create mode 100644 pkgs/static/userjs/arkenfox/default.nix create mode 100644 pkgs/static/userjs/thunderbird/default.nix create mode 100644 pkgs/static/wallpapers/default.nix create mode 100644 pkgs/static/wallpapers/sources.json (limited to 'pkgs') diff --git a/pkgs/css/lineAwesome/default.nix b/pkgs/css/lineAwesome/default.nix deleted file mode 100644 index 15946e6..0000000 --- a/pkgs/css/lineAwesome/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ stdenv, fetchurl, fontsRelativeDirectory ? "./webfonts", fontDisplay ? "auto" -}: -stdenv.mkDerivation rec { - name = "line-awesome.css"; - version = "v1.2.1"; - - src = fetchurl { - url = - "https://raw.githubusercontent.com/icons8/line-awesome/${version}/dist/line-awesome/css/line-awesome.css"; - sha256 = "sha256:GU24Xz6l3Ww4ZCcL2ByssTe04fHBRz9k2aZVRdj0xm4="; - }; - - phases = [ "installPhase" ]; - installPhase = '' - cp $src $out - substituteInPlace $out --replace '../fonts' '${fontsRelativeDirectory}' \ - --replace 'font-display: auto' 'font-display: ${fontDisplay}' - ''; -} diff --git a/pkgs/default.nix b/pkgs/default.nix index aec97a3..176d627 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,37 +1,35 @@ -pkgs: +super: let - mozillaAddons = pkgs.callPackage ./mozilla/addons { - inherit (pkgs.nur.repos.rycee.firefox-addons) buildFirefoxXpiAddon; - }; - gitignores = pkgs.callPackage ./gitignore { }; - icons = pkgs.callPackage ./icons { }; - personal = - # lib - { - lib = import ./lib { inherit (pkgs) lib; }; - } // - # css - { - line-awesome-css = pkgs.callPackage ./css/lineAwesome { }; - } // - # mozilla packages - mozillaAddons // { - arkenfoxUserJS = pkgs.callPackage ./mozilla/user-js/arkenfox.nix { }; - thunderbirdUserJS = - pkgs.callPackage ./mozilla/user-js/thunderbird.nix { }; - } // - # font metadata - { - fontawesomeMetadata = pkgs.callPackage ./fontMetadata/fontawesome.nix { }; + self = { + barista = super.callPackage ./barista { + fontawesomeMetadata = self.static.fontMetadata.fontawesome; materialDesignIconsMetadata = - pkgs.callPackage ./fontMetadata/materialDesignIcons.nix { }; - } // - # miscellaneous - { - barista = pkgs.callPackage ./barista { - inherit (personal) fontawesomeMetadata materialDesignIconsMetadata; + self.static.fontMetadata.materialDesignIcons; + }; + + lib = import ./lib { inherit (super) lib; }; + + lockscreen = super.callPackage ./lockscreen { }; + + firefoxAddons = super.callPackage ./firefoxAddons { + inherit (super.nur.repos.rycee.firefox-addons) buildFirefoxXpiAddon; + }; + + static = { + css = { lineAwesome = super.callPackage ./static/css/lineAwesome { }; }; + fontMetadata = { + fontawesome = super.callPackage ./static/fontMetadata/fontawesome { }; + materialDesignIcons = + super.callPackage ./static/fontMetadata/materialDesignIcons { }; + }; + gitignore = super.callPackage ./static/gitignore { }; + icons = super.callPackage ./static/icons { }; + userjs = { + arkenfox = super.callPackage ./static/userjs/arkenfox { }; + thunderbird = super.callPackage ./static/userjs/thunderbird { }; }; - lockscreen = pkgs.callPackage ./lockscreen { }; - } // gitignores // icons; -in personal + wallpapers = super.callPackage ./static/wallpapers { }; + }; + }; +in self diff --git a/pkgs/firefoxAddons/addons.json b/pkgs/firefoxAddons/addons.json new file mode 100644 index 0000000..d39900d --- /dev/null +++ b/pkgs/firefoxAddons/addons.json @@ -0,0 +1,16 @@ +[ + { "slug": "canvasblocker" }, + { "slug": "clearurls" }, + { "slug": "neat-url" }, + { "slug": "redirector" }, + { "slug": "smart-referer" }, + { "slug": "temporary-containers" }, + { "slug": "ublock-origin" }, + + { "slug": "darkreader" }, + { "slug": "add-custom-search-engine" }, + { "slug": "multi-account-containers" }, + { "slug": "tree-style-tab" }, + { "slug": "unpaywall" }, + { "slug": "url-in-title" } +] diff --git a/pkgs/firefoxAddons/default.nix b/pkgs/firefoxAddons/default.nix new file mode 100644 index 0000000..f87acb5 --- /dev/null +++ b/pkgs/firefoxAddons/default.nix @@ -0,0 +1,182 @@ +{ buildFirefoxXpiAddon, fetchurl, lib, stdenv }: + { + "add-custom-search-engine" = buildFirefoxXpiAddon { + pname = "add-custom-search-engine"; + version = "4.2"; + addonId = "{af37054b-3ace-46a2-ac59-709e4412bec6}"; + url = "https://addons.mozilla.org/firefox/downloads/file/3812756/add_custom_search_engine-4.2.xpi"; + sha256 = "86aaf173514ec2da55556eb339a9d7c115c6e070c5433ebff8db31baa8e165d5"; + meta = with lib; + { + description = "Add a custom search engine to the list of available search engines in the search bar and URL bar."; + license = licenses.mpl20; + platforms = platforms.all; + }; + }; + "canvasblocker" = buildFirefoxXpiAddon { + pname = "canvasblocker"; + version = "1.8"; + addonId = "CanvasBlocker@kkapsner.de"; + url = "https://addons.mozilla.org/firefox/downloads/file/3910598/canvasblocker-1.8.xpi"; + sha256 = "817a6181be877668eca1d0fef9ecf789c898e6d7d93dca7e29479d40f986c844"; + meta = with lib; + { + homepage = "https://github.com/kkapsner/CanvasBlocker/"; + description = "Alters some JS APIs to prevent fingerprinting."; + license = licenses.mpl20; + platforms = platforms.all; + }; + }; + "clearurls" = buildFirefoxXpiAddon { + pname = "clearurls"; + version = "1.24.1"; + addonId = "{74145f27-f039-47ce-a470-a662b129930a}"; + url = "https://addons.mozilla.org/firefox/downloads/file/3927638/clearurls-1.24.1.xpi"; + sha256 = "41259fc4c330261e19ff4d38734eb5fdad92e7a358a16175383e31c62d50f06b"; + meta = with lib; + { + homepage = "https://clearurls.xyz/"; + description = "Removes tracking elements from URLs"; + license = licenses.lgpl3; + platforms = platforms.all; + }; + }; + "darkreader" = buildFirefoxXpiAddon { + pname = "darkreader"; + version = "4.9.52"; + addonId = "addon@darkreader.org"; + url = "https://addons.mozilla.org/firefox/downloads/file/3968561/darkreader-4.9.52.xpi"; + sha256 = "418deb0a0aa6ee3e23c31babd57a5c1fc207945356f0617e8dd955496d80b46d"; + meta = with lib; + { + homepage = "https://darkreader.org/"; + description = "Dark mode for every website. Take care of your eyes, use dark theme for night and daily browsing."; + license = licenses.mit; + platforms = platforms.all; + }; + }; + "multi-account-containers" = buildFirefoxXpiAddon { + pname = "multi-account-containers"; + version = "8.0.7"; + addonId = "@testpilot-containers"; + url = "https://addons.mozilla.org/firefox/downloads/file/3932862/multi_account_containers-8.0.7.xpi"; + sha256 = "0e60e00c13dcc372b43ddb2e5428c2e3c1e79d2b23d7166df82d45245edc4f10"; + meta = with lib; + { + homepage = "https://github.com/mozilla/multi-account-containers/#readme"; + description = "Firefox Multi-Account Containers lets you keep parts of your online life separated into color-coded tabs. Cookies are separated by container, allowing you to use the web with multiple accounts and integrate Mozilla VPN for an extra layer of privacy."; + license = licenses.mpl20; + platforms = platforms.all; + }; + }; + "neat-url" = buildFirefoxXpiAddon { + pname = "neat-url"; + version = "5.0.0"; + addonId = "neaturl@hugsmile.eu"; + url = "https://addons.mozilla.org/firefox/downloads/file/3557562/neat_url-5.0.0.xpi"; + sha256 = "0b41899ea0eb424517bbe7ce067eae22de0ff659a0f171671e604edef86cfa2c"; + meta = with lib; + { + homepage = "http://hugsmile.eu"; + description = "Remove garbage from URLs."; + license = licenses.gpl2; + platforms = platforms.all; + }; + }; + "redirector" = buildFirefoxXpiAddon { + pname = "redirector"; + version = "3.5.3"; + addonId = "redirector@einaregilsson.com"; + url = "https://addons.mozilla.org/firefox/downloads/file/3535009/redirector-3.5.3.xpi"; + sha256 = "eddbd3d5944e748d0bd6ecb6d9e9cf0e0c02dced6f42db21aab64190e71c0f71"; + meta = with lib; + { + homepage = "http://einaregilsson.com/redirector/"; + description = "Automatically redirects to user-defined urls on certain pages"; + license = licenses.mit; + platforms = platforms.all; + }; + }; + "smart-referer" = buildFirefoxXpiAddon { + pname = "smart-referer"; + version = "0.2.15"; + addonId = "smart-referer@meh.paranoid.pk"; + url = "https://addons.mozilla.org/firefox/downloads/file/3470999/smart_referer-0.2.15.xpi"; + sha256 = "4751ab905c4d9d13b1f21c9fc179efed7d248e3476effb5b393268b46855bf1a"; + meta = with lib; + { + homepage = "https://gitlab.com/smart-referer/smart-referer"; + description = "Improve your privacy by limiting Referer information leak!"; + platforms = platforms.all; + }; + }; + "temporary-containers" = buildFirefoxXpiAddon { + pname = "temporary-containers"; + version = "1.9.2"; + addonId = "{c607c8df-14a7-4f28-894f-29e8722976af}"; + url = "https://addons.mozilla.org/firefox/downloads/file/3723251/temporary_containers-1.9.2.xpi"; + sha256 = "3340a08c29be7c83bd0fea3fc27fde71e4608a4532d932114b439aa690e7edc0"; + meta = with lib; + { + homepage = "https://github.com/stoically/temporary-containers"; + description = "Open tabs, websites, and links in automatically managed disposable containers which isolate the data websites store (cookies, storage, and more) from each other, enhancing your privacy and security while you browse."; + license = licenses.mit; + platforms = platforms.all; + }; + }; + "tree-style-tab" = buildFirefoxXpiAddon { + pname = "tree-style-tab"; + version = "3.8.26"; + addonId = "treestyletab@piro.sakura.ne.jp"; + url = "https://addons.mozilla.org/firefox/downloads/file/3975864/tree_style_tab-3.8.26.xpi"; + sha256 = "fad45a87897df26613c89403f8dc0eb22eea55faeb98119810e8c1856114e4c1"; + meta = with lib; + { + homepage = "http://piro.sakura.ne.jp/xul/_treestyletab.html.en"; + description = "Show tabs like a tree."; + platforms = platforms.all; + }; + }; + "ublock-origin" = buildFirefoxXpiAddon { + pname = "ublock-origin"; + version = "1.43.0"; + addonId = "uBlock0@raymondhill.net"; + url = "https://addons.mozilla.org/firefox/downloads/file/3961087/ublock_origin-1.43.0.xpi"; + sha256 = "ab2d4fa8dfc4f50841093830ff131d7a6e99052ba6e7359f8592e84f39c18a16"; + meta = with lib; + { + homepage = "https://github.com/gorhill/uBlock#ublock-origin"; + description = "Finally, an efficient wide-spectrum content blocker. Easy on CPU and memory."; + license = licenses.gpl3; + platforms = platforms.all; + }; + }; + "unpaywall" = buildFirefoxXpiAddon { + pname = "unpaywall"; + version = "3.98"; + addonId = "{f209234a-76f0-4735-9920-eb62507a54cd}"; + url = "https://addons.mozilla.org/firefox/downloads/file/3816853/unpaywall-3.98.xpi"; + sha256 = "6893bea86d3c4ed7f1100bf0e173591b526a062f4ddd7be13c30a54573c797fb"; + meta = with lib; + { + homepage = "https://unpaywall.org/products/extension"; + description = "Get free text of research papers as you browse, using Unpaywall's index of ten million legal, open-access articles."; + license = licenses.mit; + platforms = platforms.all; + }; + }; + "url-in-title" = buildFirefoxXpiAddon { + pname = "url-in-title"; + version = "0.5"; + addonId = "{fcdb71fb-c9e5-48a3-9d04-e32713f5da88}"; + url = "https://addons.mozilla.org/firefox/downloads/file/792317/url_in_title-0.5.xpi"; + sha256 = "5db99d775cef3c3da069b7e8e1b1e7d68c3720236c99827d85c4e78d3c35dbd7"; + meta = with lib; + { + homepage = "https://github.com/cloutierjo/titleUrl"; + description = "Add the current host name to the windows title bar. It adds the possibility to recognize the window from other application that work based on windows titles like KeePass's autotype."; + license = licenses.gpl3; + platforms = platforms.all; + }; + }; + } diff --git a/pkgs/fontMetadata/fontawesome.nix b/pkgs/fontMetadata/fontawesome.nix deleted file mode 100644 index a54537e..0000000 --- a/pkgs/fontMetadata/fontawesome.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ stdenv, fetchFromGitHub }: - -stdenv.mkDerivation rec { - name = "fontawesome-metadata"; - src = fetchFromGitHub { - owner = "FortAwesome"; - repo = "Font-Awesome"; - rev = "d79d85c3fad85ad1885e87ed558f4afd6fce8289"; - sha256 = "1sqj64vmnpysy0mc4w7b393030dzlk2vn2i1a0bzi8zlbsrccm88"; - }; - - installPhase = '' - mkdir -p $out - cp --parent metadata/icons.yml $out - ''; -} diff --git a/pkgs/fontMetadata/materialDesignIcons.nix b/pkgs/fontMetadata/materialDesignIcons.nix deleted file mode 100644 index fb24f3c..0000000 --- a/pkgs/fontMetadata/materialDesignIcons.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ stdenv, fetchFromGitHub }: - -stdenv.mkDerivation { - name = "material-design-icons-metadata"; - - src = fetchFromGitHub { - owner = "Templarian"; - repo = "MaterialDesign-Webfont"; - rev = "34bdb8135d3307eac87bcbd7377c5ae344f09b42"; - sha256 = "0mg6g262qjhjrkc9xjlv3s8a7qfh1wglfbg513d414xh3zlms4cl"; - }; - - installPhase = '' - mkdir -p $out - cp --parent scss/_variables.scss $out - ''; -} diff --git a/pkgs/gitignore/default.nix b/pkgs/gitignore/default.nix deleted file mode 100644 index fbf2d2e..0000000 --- a/pkgs/gitignore/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ fetchurl }: - -let - fetch-gitignore = module: sha256: - let url = "https://www.toptal.com/developers/gitignore/api/" + module; - name = module + ".gitignore"; - in fetchurl { inherit url sha256 name; }; -in { - emacsGitignore = fetch-gitignore "emacs" - "sha256:34LaJsGa5fFSMjE7l8JgQAmH8f07jcQmsaOdPVctHMk="; - linuxGitignore = fetch-gitignore "linux" - "sha256:Az39kpxJ1pG0T+3KUwx217+f+L8FQEWzwvRFSty8cJU="; - direnvGitignore = fetch-gitignore "direnv" - "sha256:CK47JLrsjf9yyjGAUfhjxLns0r1jDYgSBsp6LN0Yut8="; - fetcherGitignore = fetch-gitignore; -} diff --git a/pkgs/icons/default.nix b/pkgs/icons/default.nix deleted file mode 100644 index 3f1f3bf..0000000 --- a/pkgs/icons/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ fetchurl }: -{ - netflixIcon = fetchurl { - url = "https://www.vectorlogo.zone/logos/netflix/netflix-icon.svg"; - sha256 = "0b4gqhw9y62fm72x61q03yzbllgfxpkjbbsdvj7d5wg3jshjkgdb"; - }; - mubiIcon = fetchurl { - url = "https://mubi.com/logo"; - sha256 = "1h6qi579dcmd7l9mmwq2c4y67lbpkfjwq19kivfnfxwr38f769h4"; - }; - deezerIcon = fetchurl { - url = "https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/deezer.svg"; - sha256 = "1qcj1gqz8gc9cwlj4cl6yj5ik1vz4ya6qcncr5fbciprzaaf3pg9"; - }; -} diff --git a/pkgs/icons/generate-package.sh b/pkgs/icons/generate-package.sh deleted file mode 100755 index bf34c84..0000000 --- a/pkgs/icons/generate-package.sh +++ /dev/null @@ -1,11 +0,0 @@ -icons=$(cat icons.txt) - -echo '{ fetchurl }:' | tee default.nix -echo '{' | tee -a default.nix -while read -r line; do - name=$(echo $line | cut -f1 -d' ') - url=$(echo $line | cut -f2 -d' ') - sha256=$(nix-prefetch-url $url 2>/dev/null) - echo -e "\t${name}Icon = fetchurl {\n\t\turl = \"$url\";\n\t\tsha256 = \"$sha256\";\n\t};" | tee -a default.nix -done <<< $icons -echo '}' | tee -a default.nix diff --git a/pkgs/icons/icons.txt b/pkgs/icons/icons.txt deleted file mode 100644 index 388daa2..0000000 --- a/pkgs/icons/icons.txt +++ /dev/null @@ -1,3 +0,0 @@ -netflix https://www.vectorlogo.zone/logos/netflix/netflix-icon.svg -mubi https://mubi.com/logo -deezer https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/deezer.svg diff --git a/pkgs/mozilla/addons/addons.json b/pkgs/mozilla/addons/addons.json deleted file mode 100644 index d39900d..0000000 --- a/pkgs/mozilla/addons/addons.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { "slug": "canvasblocker" }, - { "slug": "clearurls" }, - { "slug": "neat-url" }, - { "slug": "redirector" }, - { "slug": "smart-referer" }, - { "slug": "temporary-containers" }, - { "slug": "ublock-origin" }, - - { "slug": "darkreader" }, - { "slug": "add-custom-search-engine" }, - { "slug": "multi-account-containers" }, - { "slug": "tree-style-tab" }, - { "slug": "unpaywall" }, - { "slug": "url-in-title" } -] diff --git a/pkgs/mozilla/addons/default.nix b/pkgs/mozilla/addons/default.nix deleted file mode 100644 index f87acb5..0000000 --- a/pkgs/mozilla/addons/default.nix +++ /dev/null @@ -1,182 +0,0 @@ -{ buildFirefoxXpiAddon, fetchurl, lib, stdenv }: - { - "add-custom-search-engine" = buildFirefoxXpiAddon { - pname = "add-custom-search-engine"; - version = "4.2"; - addonId = "{af37054b-3ace-46a2-ac59-709e4412bec6}"; - url = "https://addons.mozilla.org/firefox/downloads/file/3812756/add_custom_search_engine-4.2.xpi"; - sha256 = "86aaf173514ec2da55556eb339a9d7c115c6e070c5433ebff8db31baa8e165d5"; - meta = with lib; - { - description = "Add a custom search engine to the list of available search engines in the search bar and URL bar."; - license = licenses.mpl20; - platforms = platforms.all; - }; - }; - "canvasblocker" = buildFirefoxXpiAddon { - pname = "canvasblocker"; - version = "1.8"; - addonId = "CanvasBlocker@kkapsner.de"; - url = "https://addons.mozilla.org/firefox/downloads/file/3910598/canvasblocker-1.8.xpi"; - sha256 = "817a6181be877668eca1d0fef9ecf789c898e6d7d93dca7e29479d40f986c844"; - meta = with lib; - { - homepage = "https://github.com/kkapsner/CanvasBlocker/"; - description = "Alters some JS APIs to prevent fingerprinting."; - license = licenses.mpl20; - platforms = platforms.all; - }; - }; - "clearurls" = buildFirefoxXpiAddon { - pname = "clearurls"; - version = "1.24.1"; - addonId = "{74145f27-f039-47ce-a470-a662b129930a}"; - url = "https://addons.mozilla.org/firefox/downloads/file/3927638/clearurls-1.24.1.xpi"; - sha256 = "41259fc4c330261e19ff4d38734eb5fdad92e7a358a16175383e31c62d50f06b"; - meta = with lib; - { - homepage = "https://clearurls.xyz/"; - description = "Removes tracking elements from URLs"; - license = licenses.lgpl3; - platforms = platforms.all; - }; - }; - "darkreader" = buildFirefoxXpiAddon { - pname = "darkreader"; - version = "4.9.52"; - addonId = "addon@darkreader.org"; - url = "https://addons.mozilla.org/firefox/downloads/file/3968561/darkreader-4.9.52.xpi"; - sha256 = "418deb0a0aa6ee3e23c31babd57a5c1fc207945356f0617e8dd955496d80b46d"; - meta = with lib; - { - homepage = "https://darkreader.org/"; - description = "Dark mode for every website. Take care of your eyes, use dark theme for night and daily browsing."; - license = licenses.mit; - platforms = platforms.all; - }; - }; - "multi-account-containers" = buildFirefoxXpiAddon { - pname = "multi-account-containers"; - version = "8.0.7"; - addonId = "@testpilot-containers"; - url = "https://addons.mozilla.org/firefox/downloads/file/3932862/multi_account_containers-8.0.7.xpi"; - sha256 = "0e60e00c13dcc372b43ddb2e5428c2e3c1e79d2b23d7166df82d45245edc4f10"; - meta = with lib; - { - homepage = "https://github.com/mozilla/multi-account-containers/#readme"; - description = "Firefox Multi-Account Containers lets you keep parts of your online life separated into color-coded tabs. Cookies are separated by container, allowing you to use the web with multiple accounts and integrate Mozilla VPN for an extra layer of privacy."; - license = licenses.mpl20; - platforms = platforms.all; - }; - }; - "neat-url" = buildFirefoxXpiAddon { - pname = "neat-url"; - version = "5.0.0"; - addonId = "neaturl@hugsmile.eu"; - url = "https://addons.mozilla.org/firefox/downloads/file/3557562/neat_url-5.0.0.xpi"; - sha256 = "0b41899ea0eb424517bbe7ce067eae22de0ff659a0f171671e604edef86cfa2c"; - meta = with lib; - { - homepage = "http://hugsmile.eu"; - description = "Remove garbage from URLs."; - license = licenses.gpl2; - platforms = platforms.all; - }; - }; - "redirector" = buildFirefoxXpiAddon { - pname = "redirector"; - version = "3.5.3"; - addonId = "redirector@einaregilsson.com"; - url = "https://addons.mozilla.org/firefox/downloads/file/3535009/redirector-3.5.3.xpi"; - sha256 = "eddbd3d5944e748d0bd6ecb6d9e9cf0e0c02dced6f42db21aab64190e71c0f71"; - meta = with lib; - { - homepage = "http://einaregilsson.com/redirector/"; - description = "Automatically redirects to user-defined urls on certain pages"; - license = licenses.mit; - platforms = platforms.all; - }; - }; - "smart-referer" = buildFirefoxXpiAddon { - pname = "smart-referer"; - version = "0.2.15"; - addonId = "smart-referer@meh.paranoid.pk"; - url = "https://addons.mozilla.org/firefox/downloads/file/3470999/smart_referer-0.2.15.xpi"; - sha256 = "4751ab905c4d9d13b1f21c9fc179efed7d248e3476effb5b393268b46855bf1a"; - meta = with lib; - { - homepage = "https://gitlab.com/smart-referer/smart-referer"; - description = "Improve your privacy by limiting Referer information leak!"; - platforms = platforms.all; - }; - }; - "temporary-containers" = buildFirefoxXpiAddon { - pname = "temporary-containers"; - version = "1.9.2"; - addonId = "{c607c8df-14a7-4f28-894f-29e8722976af}"; - url = "https://addons.mozilla.org/firefox/downloads/file/3723251/temporary_containers-1.9.2.xpi"; - sha256 = "3340a08c29be7c83bd0fea3fc27fde71e4608a4532d932114b439aa690e7edc0"; - meta = with lib; - { - homepage = "https://github.com/stoically/temporary-containers"; - description = "Open tabs, websites, and links in automatically managed disposable containers which isolate the data websites store (cookies, storage, and more) from each other, enhancing your privacy and security while you browse."; - license = licenses.mit; - platforms = platforms.all; - }; - }; - "tree-style-tab" = buildFirefoxXpiAddon { - pname = "tree-style-tab"; - version = "3.8.26"; - addonId = "treestyletab@piro.sakura.ne.jp"; - url = "https://addons.mozilla.org/firefox/downloads/file/3975864/tree_style_tab-3.8.26.xpi"; - sha256 = "fad45a87897df26613c89403f8dc0eb22eea55faeb98119810e8c1856114e4c1"; - meta = with lib; - { - homepage = "http://piro.sakura.ne.jp/xul/_treestyletab.html.en"; - description = "Show tabs like a tree."; - platforms = platforms.all; - }; - }; - "ublock-origin" = buildFirefoxXpiAddon { - pname = "ublock-origin"; - version = "1.43.0"; - addonId = "uBlock0@raymondhill.net"; - url = "https://addons.mozilla.org/firefox/downloads/file/3961087/ublock_origin-1.43.0.xpi"; - sha256 = "ab2d4fa8dfc4f50841093830ff131d7a6e99052ba6e7359f8592e84f39c18a16"; - meta = with lib; - { - homepage = "https://github.com/gorhill/uBlock#ublock-origin"; - description = "Finally, an efficient wide-spectrum content blocker. Easy on CPU and memory."; - license = licenses.gpl3; - platforms = platforms.all; - }; - }; - "unpaywall" = buildFirefoxXpiAddon { - pname = "unpaywall"; - version = "3.98"; - addonId = "{f209234a-76f0-4735-9920-eb62507a54cd}"; - url = "https://addons.mozilla.org/firefox/downloads/file/3816853/unpaywall-3.98.xpi"; - sha256 = "6893bea86d3c4ed7f1100bf0e173591b526a062f4ddd7be13c30a54573c797fb"; - meta = with lib; - { - homepage = "https://unpaywall.org/products/extension"; - description = "Get free text of research papers as you browse, using Unpaywall's index of ten million legal, open-access articles."; - license = licenses.mit; - platforms = platforms.all; - }; - }; - "url-in-title" = buildFirefoxXpiAddon { - pname = "url-in-title"; - version = "0.5"; - addonId = "{fcdb71fb-c9e5-48a3-9d04-e32713f5da88}"; - url = "https://addons.mozilla.org/firefox/downloads/file/792317/url_in_title-0.5.xpi"; - sha256 = "5db99d775cef3c3da069b7e8e1b1e7d68c3720236c99827d85c4e78d3c35dbd7"; - meta = with lib; - { - homepage = "https://github.com/cloutierjo/titleUrl"; - description = "Add the current host name to the windows title bar. It adds the possibility to recognize the window from other application that work based on windows titles like KeePass's autotype."; - license = licenses.gpl3; - platforms = platforms.all; - }; - }; - } diff --git a/pkgs/mozilla/user-js/arkenfox.nix b/pkgs/mozilla/user-js/arkenfox.nix deleted file mode 100644 index c464f34..0000000 --- a/pkgs/mozilla/user-js/arkenfox.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ fetchurl }: - -let version = "109.0"; -in fetchurl { - url = - "https://raw.githubusercontent.com/arkenfox/user.js/${version}/user.js"; - sha256 = "sha256:+GJgFyfmFqbD3eepN9udJImT9H3Z9T+xnXPrHuSwIH4="; -} diff --git a/pkgs/mozilla/user-js/thunderbird.nix b/pkgs/mozilla/user-js/thunderbird.nix deleted file mode 100644 index 8899d38..0000000 --- a/pkgs/mozilla/user-js/thunderbird.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ fetchurl }: - -let version = "102.1"; -in fetchurl { - url = - "https://raw.githubusercontent.com/HorlogeSkynet/thunderbird-user.js/v${version}/user.js"; - sha256 = "1zid28fjz86a82pg21xn7icxgbv7qqwrhy7nam4cp6d9jj16nr4x"; -} diff --git a/pkgs/static/css/lineAwesome/default.nix b/pkgs/static/css/lineAwesome/default.nix new file mode 100644 index 0000000..b1376fe --- /dev/null +++ b/pkgs/static/css/lineAwesome/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchurl, fontsRelativeDirectory ? "./webfonts", fontDisplay ? "auto" +}: +stdenv.mkDerivation rec { + name = "line-awesome.css"; + version = "v1.2.1"; + + src = fetchurl { + url = + "https://raw.githubusercontent.com/icons8/line-awesome/${version}/dist/line-awesome/css/line-awesome.css"; + sha256 = "sha256:GU24Xz6l3Ww4ZCcL2ByssTe04fHBRz9k2aZVRdj0xm4="; + }; + + phases = [ "installPhase" ]; + installPhase = '' + cp "$src" "$out" + substituteInPlace "$out" --replace '../fonts' '${fontsRelativeDirectory}' \ + --replace 'font-display: auto' 'font-display: ${fontDisplay}' + ''; +} diff --git a/pkgs/static/fontMetadata/fontawesome/default.nix b/pkgs/static/fontMetadata/fontawesome/default.nix new file mode 100644 index 0000000..a54537e --- /dev/null +++ b/pkgs/static/fontMetadata/fontawesome/default.nix @@ -0,0 +1,16 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "fontawesome-metadata"; + src = fetchFromGitHub { + owner = "FortAwesome"; + repo = "Font-Awesome"; + rev = "d79d85c3fad85ad1885e87ed558f4afd6fce8289"; + sha256 = "1sqj64vmnpysy0mc4w7b393030dzlk2vn2i1a0bzi8zlbsrccm88"; + }; + + installPhase = '' + mkdir -p $out + cp --parent metadata/icons.yml $out + ''; +} diff --git a/pkgs/static/fontMetadata/materialDesignIcons/default.nix b/pkgs/static/fontMetadata/materialDesignIcons/default.nix new file mode 100644 index 0000000..fb24f3c --- /dev/null +++ b/pkgs/static/fontMetadata/materialDesignIcons/default.nix @@ -0,0 +1,17 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation { + name = "material-design-icons-metadata"; + + src = fetchFromGitHub { + owner = "Templarian"; + repo = "MaterialDesign-Webfont"; + rev = "34bdb8135d3307eac87bcbd7377c5ae344f09b42"; + sha256 = "0mg6g262qjhjrkc9xjlv3s8a7qfh1wglfbg513d414xh3zlms4cl"; + }; + + installPhase = '' + mkdir -p $out + cp --parent scss/_variables.scss $out + ''; +} diff --git a/pkgs/static/gitignore/default.nix b/pkgs/static/gitignore/default.nix new file mode 100644 index 0000000..ac825a5 --- /dev/null +++ b/pkgs/static/gitignore/default.nix @@ -0,0 +1,12 @@ +{ fetchurl, lib }: + +let + fetchGitignore = module: sha256: + let + url = "https://www.toptal.com/developers/gitignore/api/" + module; + name = module + ".gitignore"; + in fetchurl { inherit url sha256 name; }; + sources = lib.importJSON ./sources.json; +in { + fetcher = fetchGitignore; +} // builtins.mapAttrs fetchGitignore sources diff --git a/pkgs/static/gitignore/sources.json b/pkgs/static/gitignore/sources.json new file mode 100644 index 0000000..a46ff9e --- /dev/null +++ b/pkgs/static/gitignore/sources.json @@ -0,0 +1,6 @@ +{ + "direnv": "CK47JLrsjf9yyjGAUfhjxLns0r1jDYgSBsp6LN0Yut8=", + "emacs" : "34LaJsGa5fFSMjE7l8JgQAmH8f07jcQmsaOdPVctHMk=", + "latex" : "yumKOkYA44Mnfm7giSDWKFEGSmP8/1xVbcSQCfc5uBA=", + "linux" : "Az39kpxJ1pG0T+3KUwx217+f+L8FQEWzwvRFSty8cJU=" +} diff --git a/pkgs/static/icons/default.nix b/pkgs/static/icons/default.nix new file mode 100644 index 0000000..a98aee9 --- /dev/null +++ b/pkgs/static/icons/default.nix @@ -0,0 +1,15 @@ +{ fetchurl }: +{ + netflix = fetchurl { + url = "https://www.vectorlogo.zone/logos/netflix/netflix-icon.svg"; + sha256 = "0b4gqhw9y62fm72x61q03yzbllgfxpkjbbsdvj7d5wg3jshjkgdb"; + }; + mubi = fetchurl { + url = "https://mubi.com/logo"; + sha256 = "1h6qi579dcmd7l9mmwq2c4y67lbpkfjwq19kivfnfxwr38f769h4"; + }; + deezer = fetchurl { + url = "https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/deezer.svg"; + sha256 = "1qcj1gqz8gc9cwlj4cl6yj5ik1vz4ya6qcncr5fbciprzaaf3pg9"; + }; +} diff --git a/pkgs/static/icons/generate.sh b/pkgs/static/icons/generate.sh new file mode 100755 index 0000000..b5df4ab --- /dev/null +++ b/pkgs/static/icons/generate.sh @@ -0,0 +1,12 @@ +icons=$(cat urls.txt) + +echo '{ fetchurl }:' | tee default.nix +echo '{' | tee -a default.nix +while read -r line; do + name=$(echo $line | cut -f1 -d' ') + url=$(echo $line | cut -f2 -d' ') + sha256=$(nix-prefetch-url $url 2>/dev/null) + echo -e "\t${name} = fetchurl {\n\t\turl = \"$url\";\n\t\tsha256 = \"$sha256\";\n\t};" | tee -a default.nix +done <<< $icons +echo '}' | tee -a default.nix + diff --git a/pkgs/static/icons/urls.txt b/pkgs/static/icons/urls.txt new file mode 100644 index 0000000..388daa2 --- /dev/null +++ b/pkgs/static/icons/urls.txt @@ -0,0 +1,3 @@ +netflix https://www.vectorlogo.zone/logos/netflix/netflix-icon.svg +mubi https://mubi.com/logo +deezer https://raw.githubusercontent.com/edent/SuperTinyIcons/master/images/svg/deezer.svg diff --git a/pkgs/static/userjs/arkenfox/default.nix b/pkgs/static/userjs/arkenfox/default.nix new file mode 100644 index 0000000..c464f34 --- /dev/null +++ b/pkgs/static/userjs/arkenfox/default.nix @@ -0,0 +1,8 @@ +{ fetchurl }: + +let version = "109.0"; +in fetchurl { + url = + "https://raw.githubusercontent.com/arkenfox/user.js/${version}/user.js"; + sha256 = "sha256:+GJgFyfmFqbD3eepN9udJImT9H3Z9T+xnXPrHuSwIH4="; +} diff --git a/pkgs/static/userjs/thunderbird/default.nix b/pkgs/static/userjs/thunderbird/default.nix new file mode 100644 index 0000000..8899d38 --- /dev/null +++ b/pkgs/static/userjs/thunderbird/default.nix @@ -0,0 +1,8 @@ +{ fetchurl }: + +let version = "102.1"; +in fetchurl { + url = + "https://raw.githubusercontent.com/HorlogeSkynet/thunderbird-user.js/v${version}/user.js"; + sha256 = "1zid28fjz86a82pg21xn7icxgbv7qqwrhy7nam4cp6d9jj16nr4x"; +} diff --git a/pkgs/static/wallpapers/default.nix b/pkgs/static/wallpapers/default.nix new file mode 100644 index 0000000..4abeb38 --- /dev/null +++ b/pkgs/static/wallpapers/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, imagemagick, lib }: + +let + fetchWallpaper = + { name, url, sha256, resolution ? "1920x1080", offset ? "0x0" }: + stdenv.mkDerivation { + inherit name; + src = fetchurl { + inherit url sha256; + }; + buildInputs = [ imagemagick ]; + phases = [ "unpackPhase" ]; + unpackPhase = '' + convert "$src" -resize "${resolution}^" \ + -crop "${resolution}+${offset}" \ + "$out" + ''; + }; + sources = lib.importJSON ./sources.json; +in { + fetcher = fetchWallpaper; +} // builtins.mapAttrs (_: fetchWallpaper) sources diff --git a/pkgs/static/wallpapers/sources.json b/pkgs/static/wallpapers/sources.json new file mode 100644 index 0000000..a3c104a --- /dev/null +++ b/pkgs/static/wallpapers/sources.json @@ -0,0 +1,12 @@ +{ + "artic-1942-51": { + "name": "Nighthawks_by_Edward_Hopper_1942.jpg", + "url": "https://upload.wikimedia.org/wikipedia/commons/a/a8/Nighthawks_by_Edward_Hopper_1942.jpg", + "sha256": "Rzp2AoAvjoB5t2elzSv+Eg6978tzviPyCbxLq2oIU6E=" + }, + "nga-1973-68-1": { + "name": "La_vallée_de_Riaux_près_de_l'Estaque,_par_Paul_Cézanne,_NGA.jpg", + "url": "https://upload.wikimedia.org/wikipedia/commons/8/89/La_vall%C3%A9e_de_Riaux_pr%C3%A8s_de_l%27Estaque%2C_par_Paul_C%C3%A9zanne%2C_NGA.jpg", + "sha256": "F3FPz0dmyxMk9BzV9DabGkECLbYBAIH96a5KOivvrak=" + } +} -- cgit v1.2.3