From fc7daff1835099d107cd68dbad6cf9dc40ce2de5 Mon Sep 17 00:00:00 2001
From: roxwize <rae@roxwize.xyz>
Date: Sun, 9 Feb 2025 14:35:17 -0500
Subject: [PATCH] ~

Signed-off-by: roxwize <rae@roxwize.xyz>
---
 README.md                |   6 +-
 configs/openbox/menu.xml |   1 +
 configs/openbox/rc.xml   |   5 ++
 nixos/home/base.nix      |  13 ++++
 nixos/home/default.nix   |   2 +-
 nixos/home/firefox.nix   | 143 ------------------------------------
 nixos/home/mozilla.nix   | 152 +++++++++++++++++++++++++++++++++++++++
 nixos/hosts/base.nix     |   4 ++
 secrets/mail/rae.gpg     |   2 +
 9 files changed, 182 insertions(+), 146 deletions(-)
 delete mode 100644 nixos/home/firefox.nix
 create mode 100644 nixos/home/mozilla.nix
 create mode 100644 secrets/mail/rae.gpg

diff --git a/README.md b/README.md
index f75fdcf..d5e67f3 100644
--- a/README.md
+++ b/README.md
@@ -29,9 +29,11 @@ the system should boot into openbox and from there you'll have your statusbar an
 Menus
     A-d
         Main menu
-    A-question
+    A-/
+        Passwords
+    A-? (SA-/)
         Application menu
-    A-period
+    A-.
         ssh menu
     A-c
         Client (window) menu
diff --git a/configs/openbox/menu.xml b/configs/openbox/menu.xml
index 3269609..48546ea 100644
--- a/configs/openbox/menu.xml
+++ b/configs/openbox/menu.xml
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE openbox_menu>
 <openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/ file:///usr/share/openbox/menu.xsd">
     <menu id="root" label="Menu">
         <item label="Terminal emulator">
diff --git a/configs/openbox/rc.xml b/configs/openbox/rc.xml
index 143749c..84635f0 100644
--- a/configs/openbox/rc.xml
+++ b/configs/openbox/rc.xml
@@ -53,6 +53,11 @@
                 <command>rofi -show run -modes run</command>
             </action>
         </keybind>
+        <keybind key="A-question">
+            <action name="Execute">
+                <command>rofi -show pass -modes pass</command>
+            </action>
+        </keybind>
         <keybind key="A-period">
             <action name="Execute">
                 <command>rofi -show ssh -modes ssh</command>
diff --git a/nixos/home/base.nix b/nixos/home/base.nix
index d9117d3..7e60283 100644
--- a/nixos/home/base.nix
+++ b/nixos/home/base.nix
@@ -27,13 +27,21 @@
     accounts.email = {
         maildirBasePath = "mail";
         accounts.rae = rec {
+            primary = true;
             address = "rae@roxwize.xyz";
             realName = "Rae 5e";
             userName = address;
+            passwordCommand = "pass show mail/rae";
+            signature = {
+                showSignature = "append";
+                text = "rae <roxwize.xyz>";
+                delimiter = "~~~~";
+            };
             gpg = {
                 key = "6F92AED338D339DE14E7491C5B1A0FAB9BAB81EE";
                 signByDefault = true;
             };
+
             imap = {
                 host = "mail.privateemail.com";
                 port = 993;
@@ -42,6 +50,7 @@
                 host = imap.host;
                 port = 465;
             };
+
             thunderbird.enable = true;
         };
     };
@@ -79,6 +88,10 @@
             enable = true;
             font = "Fira Code Light 11";
             terminal = "kitty";
+            pass = {
+                enable = true;
+                stores = [ "/home/rae/.dotfiles/secrets" ];
+            };
         };
     };
 
diff --git a/nixos/home/default.nix b/nixos/home/default.nix
index 443b23c..e9450d5 100644
--- a/nixos/home/default.nix
+++ b/nixos/home/default.nix
@@ -3,7 +3,7 @@
         ./base.nix
 
         ./dconf.nix
-        ./firefox.nix
+        ./mozilla.nix
         ./neovim.nix
         ./polybar.nix
         ./vscode.nix
diff --git a/nixos/home/firefox.nix b/nixos/home/firefox.nix
deleted file mode 100644
index 39fa292..0000000
--- a/nixos/home/firefox.nix
+++ /dev/null
@@ -1,143 +0,0 @@
-{ pkgs, ... }: {
-    programs.firefox = {
-        enable = true;
-        policies = {
-            DisableTelemetry = true;
-            DisableFirefoxStudies = true;
-            EnableTrackingProtection = {
-                Value = true;
-                Locked = true;
-                Cryptomining = true;
-                Fingerprinting = true;
-            };
-            DisablePocket = true;
-            ExtensionUpdate = false;
-            FirefoxHome = {
-                SponsoredTopSites = false;
-                Highlights = false;
-                Pocket = false;
-                SponsoredPocket = false;
-            };
-            FirefoxSuggest = {
-                SponsoredSuggestions = false;
-            };
-        };
-        profiles.default = {
-            isDefault = true;
-            extensions = with pkgs.nur.repos.rycee.firefox-addons; [
-                canvasblocker
-                catppuccin-gh-file-explorer
-                indie-wiki-buddy
-                privacy-badger
-                stylus
-                tabliss
-                ublock-origin
-                user-agent-string-switcher
-                violentmonkey
-            ];
-            settings = {
-                "browser.aboutConfig.showWarning" = false;
-                "browser.newtabpage.activity-stream.default.sites" = "https://en.wikipedia.org/";
-                "browser.newtabpage.activity-stream.discoverystream.enabled" = false;
-                "browser.newtabpage.activity-stream.feeds.telemetry" = false;
-                "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = "";
-                "browser.newtabpage.activity-stream.newtabWallpapers.wallpaper" = "dark-beach";
-                "browser.newtabpage.activity-stream.showSponsored" = false;
-                "browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
-                "browser.newtabpage.activity-stream.telemetry" = false;
-                "browser.newtabpage.activity-stream.topSitesRows" = 2;
-                "browser.newtabpage.pinned" = [
-                    {
-                        url = "https://discord.com/app/";
-                        label = "Discord";
-                    }
-                    {
-                        url = "https://en.wikipedia.org/";
-                        label = "Wikipedia";
-                    }
-                ];
-                "datareporting.healthreport.uploadEnabled" = false;
-                "font.name.monospace.x-western" = "Fira Code";
-                "layout.css.prefers-color-scheme.content-override" = 0;
-            };
-            bookmarks = [
-                {
-                    name = "Toolbar";
-                    toolbar = true;
-                    bookmarks = [
-                        {
-                            name = "CUPS interface";
-                            url = "http://127.0.0.1:631/";
-                        }
-                        {
-                            name = "Pinky & Pepper Forever";
-                            url = "https://www.silversprocket.net/2020/05/02/pinky-and-pepper-forever-by-eddy-atoms-part-1-of-2/";
-                        }
-                    ];
-                }
-                {
-                    name = "Nix sites";
-                    bookmarks = [
-                        {
-                            name = "NixOS search";
-                            url = "https://search.nixos.org/packages";
-                        }
-                        {
-                            name = "Home Manager search";
-                            url = "https://home-manager-options.extranix.com/";
-                        }
-                        {
-                            name = "NUR search";
-                            url = "https://nur.nix-community.org/";
-                        }
-                        {
-                            name = "NixOS wiki";
-                            url = "https://nixos.wiki/";
-                        }
-                        {
-                            name = "Nix functions";
-                            url = "https://teu5us.github.io/nix-lib.html";
-                        }
-                    ];
-                }
-            ];
-            search = {
-                default = "DuckDuckGo";
-                engines = {
-                    "Nix packages" = {
-                        urls = [{
-                            template = "https://search.nixos.org/packages";
-                            params = [
-                                { name = "type"; value = "packages"; }
-                                { name = "query"; value = "{searchTerms}"; }
-                            ];
-                        }];
-                        icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
-                    };
-                    "Home Manager options" = {
-                        urls = [{
-                            template = "https://home-manager-options.extranix.com/";
-                            params = [
-                                { name = "release"; value = "release-24.11"; }
-                                { name = "query"; value = "{searchTerms}"; }
-                            ];
-                        }];
-                    };
-                    "Manpages" = {
-                        urls = [{
-                            template = "https://www.mankier.com/";
-                            params = [
-                                { name = "q"; value = "{searchTerms}"; }
-                            ];
-                        }];
-                    };
-
-                    "Bing".metaData.hidden = true;
-                    "Google".metaData.hidden = true;
-                };
-                order = [ "DuckDuckGo" "Nix packages" ];
-                force = true;
-            };
-        };
-    };
-}
diff --git a/nixos/home/mozilla.nix b/nixos/home/mozilla.nix
new file mode 100644
index 0000000..b220b15
--- /dev/null
+++ b/nixos/home/mozilla.nix
@@ -0,0 +1,152 @@
+{ pkgs, ... }: {
+    programs = rec {
+        firefox = {
+            enable = true;
+            policies = {
+                DisableTelemetry = true;
+                DisableFirefoxStudies = true;
+                EnableTrackingProtection = {
+                    Value = true;
+                    Locked = true;
+                    Cryptomining = true;
+                    Fingerprinting = true;
+                };
+                DisablePocket = true;
+                ExtensionUpdate = false;
+                FirefoxHome = {
+                    SponsoredTopSites = false;
+                    Highlights = false;
+                    Pocket = false;
+                    SponsoredPocket = false;
+                };
+                FirefoxSuggest = {
+                    SponsoredSuggestions = false;
+                };
+            };
+            profiles.default = {
+                isDefault = true;
+                extensions = with pkgs.nur.repos.rycee.firefox-addons; [
+                    canvasblocker
+                    catppuccin-gh-file-explorer
+                    indie-wiki-buddy
+                    privacy-badger
+                    stylus
+                    tabliss
+                    ublock-origin
+                    user-agent-string-switcher
+                    violentmonkey
+                ];
+                settings = {
+                    "browser.aboutConfig.showWarning" = false;
+                    "browser.newtabpage.activity-stream.default.sites" = "https://en.wikipedia.org/";
+                    "browser.newtabpage.activity-stream.discoverystream.enabled" = false;
+                    "browser.newtabpage.activity-stream.feeds.telemetry" = false;
+                    "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = "";
+                    "browser.newtabpage.activity-stream.newtabWallpapers.wallpaper" = "dark-beach";
+                    "browser.newtabpage.activity-stream.showSponsored" = false;
+                    "browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
+                    "browser.newtabpage.activity-stream.telemetry" = false;
+                    "browser.newtabpage.activity-stream.topSitesRows" = 2;
+                    "browser.newtabpage.pinned" = [
+                        {
+                            url = "https://discord.com/app/";
+                            label = "Discord";
+                        }
+                        {
+                            url = "https://en.wikipedia.org/";
+                            label = "Wikipedia";
+                        }
+                    ];
+                    "datareporting.healthreport.uploadEnabled" = false;
+                    "font.name.monospace.x-western" = "Fira Code";
+                    "layout.css.prefers-color-scheme.content-override" = 0;
+                };
+                bookmarks = [
+                    {
+                        name = "Toolbar";
+                        toolbar = true;
+                        bookmarks = [
+                            {
+                                name = "CUPS interface";
+                                url = "http://127.0.0.1:631/";
+                            }
+                            {
+                                name = "Pinky & Pepper Forever";
+                                url = "https://www.silversprocket.net/2020/05/02/pinky-and-pepper-forever-by-eddy-atoms-part-1-of-2/";
+                            }
+                        ];
+                    }
+                    {
+                        name = "Nix sites";
+                        bookmarks = [
+                            {
+                                name = "NixOS search";
+                                url = "https://search.nixos.org/packages";
+                            }
+                            {
+                                name = "Home Manager search";
+                                url = "https://home-manager-options.extranix.com/";
+                            }
+                            {
+                                name = "NUR search";
+                                url = "https://nur.nix-community.org/";
+                            }
+                            {
+                                name = "NixOS wiki";
+                                url = "https://nixos.wiki/";
+                            }
+                            {
+                                name = "Nix functions";
+                                url = "https://teu5us.github.io/nix-lib.html";
+                            }
+                        ];
+                    }
+                ];
+                search = {
+                    default = "DuckDuckGo";
+                    engines = {
+                        "Nix packages" = {
+                            urls = [{
+                                template = "https://search.nixos.org/packages";
+                                params = [
+                                    { name = "type"; value = "packages"; }
+                                    { name = "query"; value = "{searchTerms}"; }
+                                ];
+                            }];
+                            icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
+                        };
+                        "Home Manager options" = {
+                            urls = [{
+                                template = "https://home-manager-options.extranix.com/";
+                                params = [
+                                    { name = "release"; value = "release-24.11"; }
+                                    { name = "query"; value = "{searchTerms}"; }
+                                ];
+                            }];
+                        };
+                        "Manpages" = {
+                            urls = [{
+                                template = "https://www.mankier.com/";
+                                params = [
+                                    { name = "q"; value = "{searchTerms}"; }
+                                ];
+                            }];
+                        };
+
+                        "Bing".metaData.hidden = true;
+                        "Google".metaData.hidden = true;
+                    };
+                    order = [ "DuckDuckGo" "Nix packages" ];
+                    force = true;
+                };
+            };
+        };
+        thunderbird = {
+            enable = true;
+            profiles.default = {
+                isDefault = true;
+                search = firefox.profiles.default.search;
+            };
+        };
+    };
+}
diff --git a/nixos/hosts/base.nix b/nixos/hosts/base.nix
index 335959b..2a55367 100644
--- a/nixos/hosts/base.nix
+++ b/nixos/hosts/base.nix
@@ -44,6 +44,10 @@
             dedicatedServer.openFirewall = true;
             localNetworkGameTransfers.openFirewall = true;
         };
+        thunderbird = {
+            enable = true;
+            policies.DisableTelemetry = true;
+        };
     };
 
     services = {
diff --git a/secrets/mail/rae.gpg b/secrets/mail/rae.gpg
new file mode 100644
index 0000000..77da049
--- /dev/null
+++ b/secrets/mail/rae.gpg
@@ -0,0 +1,2 @@
+�^>�=�̢
@p��*�'P�+�n�%so�˭3�o�Tk
�h/6q0Wi��+��|ݘ̫��dt!�;��q{
�tJ�ɱ�ȹ*+���V…�?׽�M	�Aocb�E)��
+I2��ǘ`��|aD߳�3E�m��j1Бa�g�+�� Kׂ��.5z��g�}���0rD�
\ No newline at end of file