diff options
| author | Preston Pan <ret2pop@nullring.xyz> | 2026-02-28 20:20:41 -0800 |
|---|---|---|
| committer | Preston Pan <ret2pop@nullring.xyz> | 2026-02-28 20:20:41 -0800 |
| commit | 99a6f13e70b366a858a543f145528152164858e5 (patch) | |
| tree | ac65987c6a0cd142943ab0c5b45616a1c1356486 /nix/modules/home | |
| parent | befb04f3a1cbf7e55da26e08f8c974e72ff6f1cf (diff) | |
use librewolf instead; fix a bunch of problems
Diffstat (limited to 'nix/modules/home')
| -rw-r--r-- | nix/modules/home/default.nix | 28 | ||||
| -rw-r--r-- | nix/modules/home/emacs.nix | 10 | ||||
| -rw-r--r-- | nix/modules/home/firefox.nix | 252 | ||||
| -rw-r--r-- | nix/modules/home/git.nix | 17 | ||||
| -rw-r--r-- | nix/modules/home/hyprland.nix | 15 | ||||
| -rw-r--r-- | nix/modules/home/mbsync.nix | 24 | ||||
| -rw-r--r-- | nix/modules/home/mpd.nix | 34 | ||||
| -rw-r--r-- | nix/modules/home/msmtp.nix | 12 | ||||
| -rw-r--r-- | nix/modules/home/secrets.nix | 4 | ||||
| -rw-r--r-- | nix/modules/home/user.nix | 14 |
10 files changed, 78 insertions, 332 deletions
diff --git a/nix/modules/home/default.nix b/nix/modules/home/default.nix index a45ce59..6e92c86 100644 --- a/nix/modules/home/default.nix +++ b/nix/modules/home/default.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, sops-nix, ... }: +{ lib, config, pkgs, sops-nix, super, ... }: { imports = [ sops-nix.homeManagerModules.sops @@ -42,35 +42,13 @@ lang-coq.enable = lib.mkEnableOption "Enables coq language support"; lang-lean.enable = lib.mkEnableOption "Enables lean language support"; lang-haskell.enable = lib.mkEnableOption "Enables haskell language support"; - crypto.enable = lib.mkEnableOption "Enables various cryptocurrency wallets"; art.enable = lib.mkEnableOption "Enables various art programs"; music.enable = lib.mkEnableOption "Enables mpd"; workstation.enable = lib.mkEnableOption "Enables workstation packages (music production and others)"; cuda.enable = lib.mkEnableOption "Enables CUDA user package builds"; hyprland.enable = lib.mkEnableOption "Enables hyprland"; - - email = { - email = lib.mkOption { - type = lib.types.str; - default = "ret2pop@nullring.xyz"; - example = "john@example.com"; - description = "Email address and imaps/smtps account"; - }; - imapsServer = lib.mkOption { - type = lib.types.str; - default = "mail.nullring.xyz"; - example = "imap.example.com"; - description = "imaps server address"; - }; - smtpsServer = lib.mkOption { - type = lib.types.str; - default = "mail.nullring.xyz"; - example = "smtp.example.com"; - description = "smtp server address"; - }; - enable = lib.mkEnableOption "Enables email"; - }; + email.enable = lib.mkEnableOption "Enables email"; }; }; @@ -198,7 +176,7 @@ email.enable = lib.mkDefault config.monorepo.profiles.enable; # Programming - graphics.enable = lib.mkDefault config.monorepo.profiles.enable; + graphics.enable = lib.mkDefault (! super.monorepo.profiles.ttyonly.enable); lang-c.enable = lib.mkDefault config.monorepo.profiles.enable; lang-rust.enable = lib.mkDefault config.monorepo.profiles.enable; lang-python.enable = lib.mkDefault config.monorepo.profiles.enable; diff --git a/nix/modules/home/emacs.nix b/nix/modules/home/emacs.nix index cdf1def..bc85177 100644 --- a/nix/modules/home/emacs.nix +++ b/nix/modules/home/emacs.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ... }: +{ lib, config, pkgs, super, ... }: { programs.emacs = { @@ -6,10 +6,10 @@ package = pkgs.emacs-pgtk; extraConfig = '' (setq debug-on-error t) -(setq system-email "${config.monorepo.profiles.email.email}") -(setq system-username "${config.monorepo.vars.internetName}") -(setq system-fullname "${config.monorepo.vars.fullName}") -(setq system-gpgkey "${config.monorepo.vars.gpgKey}") +(setq system-email "${super.monorepo.vars.email}") +(setq system-username "${super.monorepo.vars.internetName}") +(setq system-fullname "${super.monorepo.vars.fullName}") +(setq system-gpgkey "${super.monorepo.vars.gpgKey}") (load "${pkgs.writeText "init.el" (builtins.readFile ../../init.el)}") ''; diff --git a/nix/modules/home/firefox.nix b/nix/modules/home/firefox.nix index 3ae8f71..df05517 100644 --- a/nix/modules/home/firefox.nix +++ b/nix/modules/home/firefox.nix @@ -1,12 +1,8 @@ { lib, config, pkgs, ... }: { - programs.firefox = { + programs.librewolf = { enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - package = pkgs.firefox; - policies = { - EnableTrackingProtection = true; - OfferToSaveLogins = false; - }; + package = pkgs.librewolf; profiles = { default = { id = 0; @@ -18,249 +14,9 @@ tree-style-tab firefox-color vimium - ] - ++ (lib.optional - config.monorepo.profiles.crypto.enable pkgs.nur.repos.rycee.firefox-addons.metamask); - - settings = { - media = { - memory_cache_max_size = 65536; - cache_readahead_limit = 7200; - cache_resume_threshold = 3600; - peerconnection.ice = { - proxy_only_if_behind_proxy = true; - default_address_only = true; - }; - }; - - gfx = { - content.skia-font-cache-size = 20; - canvas.accelerated = { - cache-items = 4096; - cache-size = 512; - }; - }; - - network = { - http = { - max-connections = 1800; - max-persistent-connections-per-server = 10; - max-urgent-start-excessive-connections-per-host = 5; - referer.XOriginTrimmingPolicy = 2; - }; - - buffer.cache = { - size = 262144; - count = 128; - }; - - dns = { - max_high_priority_threads = 8; - disablePrefetch = true; - }; - - pacing.requests.enabled = false; - dnsCacheExpiration = 3600; - ssl_tokens_cache_capacity = 10240; - prefetch-next = false; - predictor.enabled = false; - cookie.sameSite.noneRequiresSecure = true; - IDN_show_punycode = true; - auth.subresource-http-auth-allow = 1; - captive-portal-service.enabled = false; - connectivity-service.enabled = false; - }; - - browser = { - download = { - always_ask_before_handling_new_types = true; - manager.addToRecentDocs = false; - open_pdf_attachments_inline = true; - start_downloads_in_tmp_dir = true; - }; - - urlbar = { - suggest.quicksuggest.sponsored = false; - suggest.quicksuggest.nonsponsored = false; - suggest.calculator = true; - update2.engineAliasRefresh = true; - unitConversion.enabled = true; - trending.featureGate = false; - }; - - search = { - separatePrivateDefault.ui.enabled = true; - suggest.enabled = false; - }; - - newtabpage.activity-stream = { - feeds = { - topsites = false; - section.topstories = false; - telemetry = false; - }; - asrouter.userprefs.cfr = { - addons = false; - features = false; - }; - telemetry = false; - }; - - privatebrowsing = { - vpnpromourl = ""; - forceMediaMemoryCache = true; - }; - - display = { - focus_ring_on_anything = true; - focus_ring_style = 0; - focus_ring_width = 0; - }; - - cache.jsbc_compression_level = 3; - helperApps.deleteTempFileOnExit = true; - uitour.enabled = false; - sessionstore.interval = 60000; - formfill.enable = false; - xul.error_pages.expert_bad_cert = true; - contentblocking.category = "strict"; - ping-centre.telemetry = false; - discovery.enabled = false; - shell.checkDefaultBrowser = false; - preferences.moreFromMozilla = false; - tabs.tabmanager.enabled = false; - aboutConfig.showWarning = false; - aboutwelcome.enabled = false; - bookmarks.openInTabClosesMenu = false; - menu.showViewImageInfo = true; - compactmode.show = true; - safebrowsing.downloads.remote.enabled = false; - tabs.crashReporting.sendReport = false; - crashReports.unsubmittedCheck.autoSubmit2 = false; - privateWindowSeparation.enabled = false; - }; - - security = { - mixed_content = { - block_display_content = true; - upgrade_display_content = true; - }; - insecure_connection_text = { - enabled = true; - pbmode.enabled = true; - }; - OCSP.enabled = 0; - remote_settings.crlite_filters.enabled = true; - pki.crlite_mode = 2; - ssl.treat_unsafe_negotiation_as_broken = true; - tls.enable_0rtt_data = false; - }; - - toolkit = { - telemetry = { - unified = false; - enabled = false; - server = "data:,"; - archive.enabled = false; - newProfilePing.enabled = false; - shutdownPingSender.enabled = false; - updatePing.enabled = false; - bhrPing.enabled = false; - firstShutdownPing.enabled = false; - coverage.opt-out = true; - }; - coverage = { - opt-out = true; - endpoint.base = ""; - }; - legacyUserProfileCustomizations.stylesheets = true; - }; - - dom = { - security = { - https_first = true; - https_first_schemeless = true; - sanitizer.enabled = true; - }; - enable_web_task_scheduling = true; - }; - - layout = { - css = { - grid-template-masonry-value.enabled = true; - has-selector.enabled = true; - prefers-color-scheme.content-override = 2; - }; - word_select.eat_space_to_next_word = false; - }; - - urlclassifier = { - trackingSkipURLs = "*.reddit.com, *.twitter.com, *.twimg.com, *.tiktok.com"; - features.socialtracking.skipURLs = "*.instagram.com, *.twitter.com, *.twimg.com"; - }; - - privacy = { - globalprivacycontrol.enabled = true; - history.custom = true; - userContext.ui.enabled = true; - trackingprotection = { - enabled = true; - pbmode.enabled = true; - socialtracking.enabled = true; - }; - }; - - full-screen-api = { - transition-duration = { - enter = "0 0"; - leave = "0 0"; - }; - warning = { - delay = -1; - timeout = 0; - }; - }; - - permissions.default = { - desktop-notification = 2; - geo = 2; - }; - - signon = { - formlessCapture.enabled = false; - privateBrowsingCapture.enabled = false; - }; - - datareporting = { - policy.dataSubmissionEnabled = false; - healthreport.uploadEnabled = false; - }; - - extensions = { - pocket.enabled = false; - getAddons.showPane = false; - htmlaboutaddons.recommendations.enabled = false; - postDownloadThirdPartyPrompt = false; - }; - - app = { - shield.optoutstudies.enabled = false; - normandy.enabled = false; - normandy.api_url = ""; - }; + privacy-redirect + ] ++ (lib.optional config.monorepo.profiles.crypto.enable pkgs.nur.repos.rycee.firefox-addons.metamask); - image.mem.decode_bytes_at_a_time = 32768; - editor.truncate_user_pastes = false; - pdfjs.enableScripting = false; - geo.provider.network.url = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"; - permissions.manager.defaultsUrl = ""; - webchannel.allowObject.urlWhitelist = ""; - breakpad.reportURL = ""; - captivedetect.canonicalURL = ""; - cookiebanners.service.mode = 1; - findbar.highlightAll = true; - content.notify.interval = 100000; - }; }; }; }; diff --git a/nix/modules/home/git.nix b/nix/modules/home/git.nix index 24e84b4..4018a3b 100644 --- a/nix/modules/home/git.nix +++ b/nix/modules/home/git.nix @@ -1,25 +1,26 @@ -{ pkgs, lib, config, ... }: +{ pkgs, lib, config, super, ... }: { programs.git = { enable = lib.mkDefault config.monorepo.profiles.graphics.enable; package = pkgs.gitFull; lfs.enable = lib.mkDefault config.monorepo.profiles.graphics.enable; - userName = config.monorepo.vars.fullName; - userEmail = config.monorepo.profiles.email.email; + userName = super.monorepo.vars.fullName; + userEmail = "${super.monorepo.vars.email}"; signing = { - key = config.monorepo.vars.gpgKey; + key = super.monorepo.vars.gpgKey; signByDefault = true; }; extraConfig = { init.defaultBranch = "main"; - credential."${config.monorepo.profiles.email.smtpsServer}" = { - username = "${config.monorepo.profiles.email.email}"; + credential."mail.${super.monorepo.vars.orgHost}" = { + username = "${super.monorepo.vars.email}"; helper = "!f() { test \"$1\" = get && echo \"password=$(cat /run/user/1000/secrets/mail)\"; }; f"; }; + sendemail = { - smtpserver = "${config.monorepo.profiles.email.smtpsServer}"; - smtpuser = "${config.monorepo.profiles.email.email}"; + smtpserver = "mail.${super.monorepo.vars.orgHost}"; + smtpuser = "${super.monorepo.vars.email}"; smtpserverport = 465; smtpencryption = "ssl"; }; diff --git a/nix/modules/home/hyprland.nix b/nix/modules/home/hyprland.nix index b649e96..3e867cb 100644 --- a/nix/modules/home/hyprland.nix +++ b/nix/modules/home/hyprland.nix @@ -23,7 +23,7 @@ "fcitx5 -d --replace" "fcitx5-remote -r" "emacs" - "firefox" + "librewolf" ]; env = [ "LIBVA_DRIVER_NAME,nvidia" @@ -53,11 +53,16 @@ workspace = 1; } { - name = "firefox"; - "match:class" = "firefox"; + name = "librewolf"; + "match:class" = "librewolf"; workspace = 2; } { + name = "element-desktop"; + "match:class" = "element-desktop"; + workspace = 3; + } + { name = "vesktop"; "match:class" = "vesktop"; workspace = 3; @@ -80,13 +85,13 @@ ]; bind = [ - "$mod, F, exec, firefox" + "$mod, F, exec, librewolf" "$mod, Return, exec, kitty" "$mod, E, exec, emacs" "$mod, B, exec, bitcoin-qt" "$mod, S, exec, pavucontrol" "$mod, M, exec, monero-wallet-gui" - "$mod, V, exec, vesktop" + "$mod, V, exec, element-desktop" "$mod, C, exec, fluffychat" "$mod, D, exec, wofi --show run" "$mod, P, exec, bash ${scripts}/powermenu.sh" diff --git a/nix/modules/home/mbsync.nix b/nix/modules/home/mbsync.nix index b7c7424..893528e 100644 --- a/nix/modules/home/mbsync.nix +++ b/nix/modules/home/mbsync.nix @@ -1,28 +1,28 @@ -{ lib, config, ... }: +{ lib, config, super, ... }: { programs.mbsync = { enable = lib.mkDefault config.monorepo.profiles.email.enable; extraConfig = '' - IMAPAccount ${config.monorepo.vars.internetName} - Host ${config.monorepo.profiles.email.imapsServer} - User ${config.monorepo.profiles.email.email} + IMAPAccount ${super.monorepo.vars.internetName} + Host mail.${super.monorepo.vars.orgHost} + User ${super.monorepo.vars.email} PassCmd "cat ${config.sops.secrets.mail.path}" Port 993 TLSType IMAPS AuthMechs * CertificateFile /etc/ssl/certs/ca-certificates.crt - IMAPStore ${config.monorepo.vars.internetName}-remote - Account ${config.monorepo.vars.internetName} + IMAPStore ${super.monorepo.vars.internetName}-remote + Account ${super.monorepo.vars.internetName} - MaildirStore ${config.monorepo.vars.internetName}-local - Path ~/email/${config.monorepo.vars.internetName}/ - Inbox ~/email/${config.monorepo.vars.internetName}/INBOX + MaildirStore ${super.monorepo.vars.internetName}-local + Path ~/email/${super.monorepo.vars.internetName}/ + Inbox ~/email/${super.monorepo.vars.internetName}/INBOX SubFolders Verbatim - Channel ${config.monorepo.vars.internetName} - Far :${config.monorepo.vars.internetName}-remote: - Near :${config.monorepo.vars.internetName}-local: + Channel ${super.monorepo.vars.internetName} + Far :${super.monorepo.vars.internetName}-remote: + Near :${super.monorepo.vars.internetName}-local: Patterns * Create Near Sync All diff --git a/nix/modules/home/mpd.nix b/nix/modules/home/mpd.nix index 2ab711b..b423a70 100644 --- a/nix/modules/home/mpd.nix +++ b/nix/modules/home/mpd.nix @@ -10,14 +10,14 @@ network.listenAddress = "0.0.0.0"; extraConfig = '' audio_output { - type "pipewire" - name "pipewire output" + type "pipewire" + name "pipewire output" } audio_output { type "httpd" name "Ret2pop's Music Stream" - encoder "opus" # optional + encoder "opus" port "8000" bitrate "128000" format "48000:16:1" @@ -25,20 +25,20 @@ tags "yes" } -audio_output { - type "shout" - name "My VPS Stream" - host "127.0.0.1" - port "8888" # This must match your SSH tunnel local port - mount "/stream" # The URL path (e.g. http://vps:8000/stream) - password "SuperSecretSourcePass" - bitrate "128" - format "44100:16:2" - protocol "icecast2" # Essential for modern Icecast - user "source" # Default icecast source user - description "My MPD Stream" - genre "Mixed" -} + audio_output { + type "shout" + name "My VPS Stream" + host "127.0.0.1" + port "8888" + mount "/stream" + password "SuperSecretSourcePass" + bitrate "128" + format "44100:16:2" + protocol "icecast2" + user "source" + description "My MPD Stream" + genre "Mixed" + } ''; }; } diff --git a/nix/modules/home/msmtp.nix b/nix/modules/home/msmtp.nix index 6d69922..c1abd8f 100644 --- a/nix/modules/home/msmtp.nix +++ b/nix/modules/home/msmtp.nix @@ -1,4 +1,4 @@ -{ lib, config, ... }: +{ lib, config, super, ... }: { programs.msmtp = { enable = lib.mkDefault config.monorepo.profiles.email.enable; @@ -12,16 +12,16 @@ logfile ~/.msmtp.log # Gmail - account ${config.monorepo.vars.userName} - host ${config.monorepo.profiles.email.smtpsServer} + account ${super.monorepo.vars.internetName} + host mail.${super.monorepo.vars.orgHost} port 587 - from ${config.monorepo.profiles.email.email} - user ${config.monorepo.profiles.email.email} + from ${super.monorepo.vars.email} + user ${super.monorepo.vars.email} passwordeval "cat ${config.sops.secrets.mail.path}" # Set a default account - account default : ${config.monorepo.vars.userName} + account default : ${super.monorepo.vars.internetName} ''; }; } diff --git a/nix/modules/home/secrets.nix b/nix/modules/home/secrets.nix index a38b4e0..8de0f59 100644 --- a/nix/modules/home/secrets.nix +++ b/nix/modules/home/secrets.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, super, ... }: { sops = { defaultSopsFile = if config.monorepo.profiles.graphics.enable @@ -6,7 +6,7 @@ else ../../secrets/vps_secrets.yaml; age = { - keyFile = "/home/${config.monorepo.vars.userName}/.config/sops/age/keys.txt"; + keyFile = "/home/${super.monorepo.vars.userName}/.config/sops/age/keys.txt"; }; secrets = if config.monorepo.profiles.graphics.enable then { diff --git a/nix/modules/home/user.nix b/nix/modules/home/user.nix index 28bbd22..05729b1 100644 --- a/nix/modules/home/user.nix +++ b/nix/modules/home/user.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ... }: +{ lib, config, super, pkgs, ... }: { home = { activation.startup-files = lib.hm.dag.entryAfter [ "installPackages" ] '' @@ -47,7 +47,7 @@ # Apps # octaveFull - vesktop grim swww vim kotatogram-desktop tg qwen-code element-desktop thunderbird jami + grim swww vim kotatogram-desktop tg qwen-code element-desktop signal-desktop thunderbird jami # Sound/media pavucontrol alsa-utils imagemagick ffmpeg helvum @@ -59,7 +59,7 @@ torsocks tor-browser # For transfering secrets onto new system - magic-wormhole stow + stow # fonts nerd-fonts.iosevka noto-fonts noto-fonts-cjk-sans noto-fonts-color-emoji fira-code font-awesome_6 victor-mono @@ -133,7 +133,6 @@ cd "$HOME" '') ] else [ pfetch - # net curl torsocks @@ -155,6 +154,13 @@ cd "$HOME" enable = true; defaultApplications = { "x-scheme-handler/mailto" = "emacsclient-mail.desktop"; + "text/html" = "librewolf.desktop"; + "text/xml" = "librewolf.desktop"; + "application/xhtml+xml" = "librewolf.desktop"; + "x-scheme-handler/http" = "librewolf.desktop"; + "x-scheme-handler/https" = "librewolf.desktop"; + "x-scheme-handler/about" = "librewolf.desktop"; + "x-scheme-handler/unknown" = "librewolf.desktop"; }; }; |
