diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/communication/neomutt/account/flavors/gmail.nix | 1 | ||||
| -rw-r--r-- | modules/desktop/waybar/default.nix | 7 | ||||
| -rw-r--r-- | modules/desktop/waybar/style.mustache.css | 85 | ||||
| -rw-r--r-- | modules/desktop/waybar/style.nix | 66 | ||||
| -rw-r--r-- | modules/scripts/usque-warp/script.sh | 5 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/aria2-explorer.nix | 10 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/browserpass.nix | 12 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/dark-mode.nix | 3 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/lib.nix | 19 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/searxng-home.nix | 3 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/ublock-origin.nix | 3 |
11 files changed, 123 insertions, 91 deletions
diff --git a/modules/communication/neomutt/account/flavors/gmail.nix b/modules/communication/neomutt/account/flavors/gmail.nix index 28653c9..4d6cff2 100644 --- a/modules/communication/neomutt/account/flavors/gmail.nix +++ b/modules/communication/neomutt/account/flavors/gmail.nix @@ -33,6 +33,7 @@ neomutt.extraConfig = lib.mkDefault '' mailboxes =Inbox ="[Gmail]/Drafts" ="[Gmail]/Sent Mail" ="[Gmail]/Spam" ="[Gmail]/Trash" + unset record ''; notmuch.neomutt.virtualMailboxes = lib.mkDefault [ diff --git a/modules/desktop/waybar/default.nix b/modules/desktop/waybar/default.nix index 67d0f63..9872086 100644 --- a/modules/desktop/waybar/default.nix +++ b/modules/desktop/waybar/default.nix @@ -15,7 +15,12 @@ (import ./module { inherit config lib pkgs; }) ]; - style = import ./style.nix { inherit config; }; + style = builtins.readFile ( + config.scheme { + template = builtins.readFile ./style.mustache.css; + extension = ".css"; + } + ); }; }; } diff --git a/modules/desktop/waybar/style.mustache.css b/modules/desktop/waybar/style.mustache.css new file mode 100644 index 0000000..ddeaa88 --- /dev/null +++ b/modules/desktop/waybar/style.mustache.css @@ -0,0 +1,85 @@ +/* + * Waybar Style — Base16 "OneDark Dark" (olimorris) + * Mustache template: render with a base16 color map to produce a .css file + * + * base00 - default background + * base01 - lighter background (status bar, line numbers) + * base02 - selection background + * base03 - comments, invisibles + * base04 - dark foreground (status bar) + * base05 - default foreground + * base06 - light foreground + * base07 - lightest foreground + * base08 - red (errors, urgent) + * base09 - orange (numbers) + * base0A - yellow (search matches) + * base0B - green (strings) + * base0C - cyan (support, regex) + * base0D - blue (functions, active/selected) + * base0E - purple/magenta (keywords) + * base0F - brown (deprecated) + */ + +* { + border: none; + border-radius: 0; + font-family: "Fira Code Nerd Font"; + font-size: 18px; + min-height: 0; + margin: 0; + padding: 0; +} + +window#waybar { + background: transparent; +} + +#workspaces, #window, #pulseaudio, #battery, #network, +#clock.time, #custom-usque, #memory, #cpu, #clock.date { + background: #{{base00}}; + margin: 0 5px; +} + +#workspaces { + border: none; + margin-right: 0; +} + +#window, #pulseaudio, #battery, #network, +#clock.time, #custom-usque, #memory, #cpu, #clock.date { + border: 1px solid #{{base07}}; + color: #{{base07}}; + padding: 0 10px; +} + +#clock.date { + margin-right: 10px; +} + +#workspaces button { + padding: 0px 5px; + color: #{{base07}}; + border: 1px solid #{{base03}}; + border-radius: 0; + min-width: 0px; + min-height: 0px; + margin: 0 5px; + font-size: 24px; +} + +#workspaces button:hover { + background: #{{base00}}; + border-color: #{{base05}}; +} + +#workspaces button.active { + border-color: #{{base07}}; +} + +#workspaces button.empty { + color: #{{base03}}; +} + +#workspaces button.urgent { + color: #{{base08}}; +} diff --git a/modules/desktop/waybar/style.nix b/modules/desktop/waybar/style.nix deleted file mode 100644 index 4ca496f..0000000 --- a/modules/desktop/waybar/style.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ config }: -with config.scheme.withHashtag; -'' - * { - border: none; - border-radius: 0; - font-family: "${config.fonts.normal}"; - font-size: ${toString config.fonts.size}px; - min-height: 0; - margin: 0; - padding: 0; - } - - window#waybar { - background: transparent; - } - - #workspaces, #window, #pulseaudio, #battery, #network, - #clock.time, #custom-usque, #memory, #cpu, #clock.date { - background: ${base00}; - margin: 0 5px; - } - - #workspaces { - border: none; - margin-right: 0; - } - - #window, #pulseaudio, #battery, #network, - #clock.time, #custom-usque, #memory, #cpu, #clock.date { - border: 1px solid ${base07}; - color: ${base07}; - padding: 0 10px; - } - - #clock.date { - margin-right: 10px; - } - - #workspaces button { - padding: 0px 5px; - color: ${base07}; - border: 1px solid ${base03}; - border-radius: 0; - min-width: 0px; - min-height: 0px; - margin: 0 5px; - font-size: 24px; - } - - #workspaces button:hover { - background: ${base01}; - } - - #workspaces button.active { - border-color: ${base07}; - } - - #workspaces button.empty { - color: ${base03}; - } - - #workspaces button.urgent { - color: ${base08}; - } -'' diff --git a/modules/scripts/usque-warp/script.sh b/modules/scripts/usque-warp/script.sh index ed2e56e..a959cc4 100644 --- a/modules/scripts/usque-warp/script.sh +++ b/modules/scripts/usque-warp/script.sh @@ -27,14 +27,11 @@ is_running() { } ensure_config() { - if [[ -f "$CONFIG" ]]; then - return - fi echo "usque config not found." echo "Creating $CONFIG_DIR..." mkdir -p "$CONFIG_DIR" echo "Registering Cloudflare WARP account..." - usque register + yes | usque register echo "Generating usque config..." usque generate -o "$CONFIG" if [[ ! -f "$CONFIG" ]]; then diff --git a/modules/web/chromium/extensions/aria2-explorer.nix b/modules/web/chromium/extensions/aria2-explorer.nix index 0ee9779..694d74e 100644 --- a/modules/web/chromium/extensions/aria2-explorer.nix +++ b/modules/web/chromium/extensions/aria2-explorer.nix @@ -15,18 +15,18 @@ let version ; tagPrefix = "v"; - urlTemplate = "https://github.com/${owner}/${repo}/releases/download/v<version>/A2E-v<version>.crx"; + urlTemplate = "https://github.com/${owner}/${repo}/archive/refs/tags/v<version>.zip"; }; in { inherit pname; version = checkedVersion; - id = "jnnfdabjmnliapnhdbnljjlfamdkeohn"; + id = "hhndckjijagcbbljjhjcbnpjhamkkcjl"; drv = extLib.fetchUnpackedExtension { inherit pname; version = checkedVersion; - url = "https://github.com/${owner}/${repo}/releases/download/v${checkedVersion}/A2E-v${checkedVersion}.crx"; - hash = "sha256-ljTgKd9QJTRJ11rlNx+PTynlQvdLW3IEoYNnCeOU2K8="; - isCrx = true; + url = "https://github.com/${owner}/${repo}/archive/refs/tags/v${checkedVersion}.zip"; + hash = "sha256-4+SkvgWrELcohpv724YEtvSQSDCmjphkk8bvYggxVag="; + extensionKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArOOLc1LawtEonls6j4P/KQyUAGO3KJcE9uAU9WV/tBIX6ulXivZypUAXC6Lokv56Bjnc08t/wUH8Xph0Gya4UzjSbZkdtR94yksY9mq5g/8df4p4v29SO+E6efQyXGyImEzFSHsNP4gu8akB5xT8O//51XRAXsMBVgUUTuUAlpnwd25Yy1tpQwqjbSV3gvAMo+a6+y0dBfXJ9fjwAYBwvx4cONSNjirIuyOG5r5FI5TaGMK+aV1xwNsDE59dyDkYL2f2mm1kN/2xMcayJrskVxtOcy18ijjXzyRJvNyhkLM2c5tEZHUkIlEgTjbJruF8EKrj2sCnodt1jknD0BSr1wIDAQAB"; }; } diff --git a/modules/web/chromium/extensions/browserpass.nix b/modules/web/chromium/extensions/browserpass.nix index 211b6f1..88ed7f4 100644 --- a/modules/web/chromium/extensions/browserpass.nix +++ b/modules/web/chromium/extensions/browserpass.nix @@ -15,20 +15,18 @@ let version ; tagPrefix = ""; - urlTemplate = "https://github.com/${owner}/${repo}/releases/download/<version>/browserpass-webstore-<version>.crx"; + urlTemplate = "https://github.com/${owner}/${repo}/releases/download/<version>/browserpass-chromium-<version>.zip"; }; in { inherit pname; version = checkedVersion; - # Stable webstore ID — only holds if the crx's manifest.json embeds "key". - # Verify at chrome://extensions after switching; update if it drifts. - id = "klfoddkbhleoaabpmiigbmpbjfljimgb"; + id = "jbaodoonnfhdccelcpnekimkijgdfjhl"; drv = extLib.fetchUnpackedExtension { inherit pname; version = checkedVersion; - url = "https://github.com/${owner}/${repo}/releases/download/${checkedVersion}/browserpass-webstore-${checkedVersion}.crx"; - hash = "sha256-NfLbEe2EBctmntJqbsIpwm2WRFdo8q6yjWGjVK2MmFE="; - isCrx = true; + url = "https://github.com/${owner}/${repo}/releases/download/${checkedVersion}/browserpass-chromium-${checkedVersion}.zip"; + hash = "sha256-WBpPTtec7zJPWM1xNKVxWWW/sB1aIuPecp5fUTWRE8c="; + extensionKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv8xL6YhF7YTUE57jhme0vyJi4FZGXDBLV93QYWv6yrYbmczkM4aEOp4FWm63NnkJ8aGZ/0uL0rHmB4qo36awso/1L9XGJaBbQAQuOv/uIPAE18STJ4EtXA1hYDMGbkkr4fZHYJTH3GmoeajZYfp/cu8qc0cK4P5FVq67qwYSD4uFQJRJKuX8jM4lzO8dLH/tJsN3KwlfeSA8xvS2jiIJHtCKc6XqMrOCCfSmI8uILfg06fv46VOoVDH91dlZguOYANAJDW69uCY9YcvyVEmmf6DUnvmkrziDtV2O4/Af6nt7R5JHOcVcqVScoXJG9sfd4KATMcgoZj3fy19+R/4GvwIDAQAB"; }; } diff --git a/modules/web/chromium/extensions/dark-mode.nix b/modules/web/chromium/extensions/dark-mode.nix index 0a84ae8..efd8cbb 100644 --- a/modules/web/chromium/extensions/dark-mode.nix +++ b/modules/web/chromium/extensions/dark-mode.nix @@ -21,11 +21,12 @@ in { inherit pname; version = checkedVersion; - id = "mnollmcmkninmddnibfgoncobcehfhef"; + id = "nfkppknaehpcafkbgmhfhkpapflndfip"; drv = extLib.fetchUnpackedExtension { inherit pname; version = checkedVersion; url = "https://github.com/${owner}/${repo}/archive/refs/tags/v${checkedVersion}.zip"; hash = "sha256-Lt3T8i0ylV0l+T0eqnzs6veBcOpizhP79LgSkUx4xI8="; + extensionKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8xN0p4CHkthdkB6imIb+8T2xsNSH9eeFAy7NhP3xAO1ML6FJyOFroabQIG6HcV7miXmJamY7zmE96QgEEvGqQ18+g+RsfvriJp0LRXi95TJBdCXoMiW348bWmue0Jk+/rhzWijMn/z/5fDnrZl0xjKU7MAXzW9dWfiTeIBc4wlk21zjGJxiG0uM1YAywe3jW8g0QCBga9iTaN67D+sBbBs4HmPa3xIbtPTAgqt1LDEk2T7IseoUia8MwxATWKWFegW6legMkPLVWH9jQ+x2ZbjtDP9GXk+1YqqWQUll1Xmal7C9ljeagkM5nhxgttAQoWBMPMJFwr7VN3AXtNXXPWQIDAQAB"; }; } diff --git a/modules/web/chromium/extensions/lib.nix b/modules/web/chromium/extensions/lib.nix index 8821b03..d319a5c 100644 --- a/modules/web/chromium/extensions/lib.nix +++ b/modules/web/chromium/extensions/lib.nix @@ -73,6 +73,7 @@ rec { url, hash, isCrx ? false, + extensionKey ? null, # NEW: Accept an optional public key }: pkgs.stdenv.mkDerivation { inherit pname version; @@ -80,6 +81,7 @@ rec { nativeBuildInputs = [ config.file-management.ouch.package + pkgs.jq # NEW: Required for safely editing manifest.json ]; dontUnpack = true; @@ -96,10 +98,7 @@ rec { fi # Extract header length (bytes 8-11, little-endian) - # -An (no address), -j8 (skip 8 bytes), -N4 (read 4 bytes), -tu1 (unsigned decimal 1-byte) bytes=$(od -An -j8 -N4 -tu1 "$src") - - # Read into individual variables and calculate the length read b1 b2 b3 b4 <<< $bytes hlen=$(( b1 + (b2 << 8) + (b3 << 16) + (b4 << 24) )) offset=$(( 12 + hlen )) @@ -118,13 +117,23 @@ rec { shopt -u dotglob fi + # NEW: Inject the public key into manifest.json if provided + ${lib.optionalString (extensionKey != null) '' + if [ -f "$out/manifest.json" ]; then + echo "Injecting extension key into manifest.json to lock the extension ID..." + jq '.key = "${extensionKey}"' "$out/manifest.json" > "$out/manifest.tmp.json" + mv "$out/manifest.tmp.json" "$out/manifest.json" + else + echo "Warning: No manifest.json found in $out to inject the key!" >&2 + fi + ''} + runHook postBuild ''; installPhase = "true"; - }; + }; # --- Package a local directory as an unpacked extension derivation. --- - # --- Package a local directory as an unpacked extension derivation. --- mkLocalExtension = { pname, diff --git a/modules/web/chromium/extensions/searxng-home.nix b/modules/web/chromium/extensions/searxng-home.nix index 73cc7fd..fcac55d 100644 --- a/modules/web/chromium/extensions/searxng-home.nix +++ b/modules/web/chromium/extensions/searxng-home.nix @@ -24,7 +24,7 @@ in inherit pname; version = checkedVersion; - id = "acoijbpbnodehiibdpmkkhlpmcnabpaa"; + id = "gmkjafoflhifgcnmpomcoakhahmepfkc"; drv = extLib.fetchUnpackedExtension { inherit pname; @@ -32,5 +32,6 @@ in url = "https://github.com/${owner}/${repo}/releases/download/v${checkedVersion}/chrome-v${checkedVersion}.zip"; hash = "sha256-fbXxtjTa8GKxylc5JS3GVj/oC+xCI5VJkE3bBpA2CbY="; isCrx = false; + extensionKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2cDXvyOi1QgsWlC8LnwyXIV7EZ6yWLKvKCNBn8DPD4DwJgw221wqo6R9p/qnsnqAuveZrV/ApRq6MdzAclkWTGKyCJCRdJGBG/XM3BVfMBkuLXaLrvpFf8p/mDcAP37yOh0Z45XMTr55Y9ifnNH6Wu+3zAaASJlkBuGZ5ygbcUYcomcKjs7qfqxqY8Qe9ovIuLOQely+X9i+Qa6bZ0GJUTgXiKHckgY/43l+H+gs9V91he8qaSubzWPqwbYk8aWhTmjQTeR0vfUP+1/XBESt4u4NGxHsuk+ZwwbL6ThYRbzgj/UbvVGVQsanhIwODdJte51XanEo475Woal31++uxwIDAQAB"; }; } diff --git a/modules/web/chromium/extensions/ublock-origin.nix b/modules/web/chromium/extensions/ublock-origin.nix index a46d5b7..5bc88df 100644 --- a/modules/web/chromium/extensions/ublock-origin.nix +++ b/modules/web/chromium/extensions/ublock-origin.nix @@ -21,11 +21,12 @@ in { inherit pname; version = checkedVersion; - id = "ojmlhihnkagpnkkkjngdngbiidmafdbm"; + id = "eahmphincfcmmpgkpobpneimcjndlcna"; drv = extLib.fetchUnpackedExtension { inherit pname; version = checkedVersion; url = "https://github.com/${owner}/${repo}/releases/download/${checkedVersion}/uBlock0_${checkedVersion}.chromium.zip"; hash = "sha256-0QTKxOH0jXaxw/+Irt4uqoJpgUrgbMnIUNJ6+1J05TM="; + extensionKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtXfkoFzWOh3Fet9x4L6WY1pw755kt7bFwqd/nmTm5Ptg7d40Qde0tTIhceCFVkwrWTQ3n2/WSpYXoU/UMgSW9anBzoUM0ZXanIdoeHwvL3eMNyx+iyvSrRxee26GwzbZ8J0UvH77KT3rW/iV5ejV4wTxTD3rFr0udkI5bbTPYpmGFOKPD8I3IB6BsoUTKW3XTSLM0fUYggdbDNwQGZvLYwqZzk/vWH/oifHR6CEvdFR51JAdf3tJQhttI6My49Vq6etCi9y5ZLXrMksxcEcIlQKaF2fdlfL1bYXRAVFDsieuAmu3gJPBj65PVJif5A7DfcH8zm8YGPwrJlTjaJQeDQIDAQAB"; }; } |
