From b65e4cbdae81bba70eee234cf80c3cbacf4a7bcd Mon Sep 17 00:00:00 2001 From: Atridad Lahiji Date: Mon, 16 Feb 2026 15:18:42 -0700 Subject: [PATCH] ??? --- flake.nix | 1 + modules/home/default.nix | 3 ++ modules/home/ghostty.nix | 15 ++++++++ modules/home/git.nix | 16 +++++++++ modules/home/ssh.nix | 29 ++++++++++++++++ modules/homebrew.nix | 3 +- modules/librewolf.nix | 74 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 modules/home/ghostty.nix create mode 100644 modules/home/git.nix create mode 100644 modules/home/ssh.nix create mode 100644 modules/librewolf.nix diff --git a/flake.nix b/flake.nix index edb606b..9ccc48b 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,7 @@ ./modules/packages/security.nix ./modules/packages/networking.nix ./modules/homebrew.nix + ./modules/librewolf.nix ./modules/home/default.nix ]; }; diff --git a/modules/home/default.nix b/modules/home/default.nix index 2e41fc1..b69e1c1 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -8,6 +8,9 @@ users.atridad = { pkgs, lib, ... }: { imports = [ ./zed.nix + ./ssh.nix + ./git.nix + ./ghostty.nix ]; home = { diff --git a/modules/home/ghostty.nix b/modules/home/ghostty.nix new file mode 100644 index 0000000..3b8bfe3 --- /dev/null +++ b/modules/home/ghostty.nix @@ -0,0 +1,15 @@ +{ pkgs, lib, ... }: + +{ + programs.ghostty = { + enable = true; + package = lib.mkForce (pkgs.runCommand "ghostty-stub" { } "mkdir -p $out"); + + enableZshIntegration = true; + + settings = { + theme = "Catppuccin Macchiato"; + background-opacity = "0.95"; + }; + }; +} diff --git a/modules/home/git.nix b/modules/home/git.nix new file mode 100644 index 0000000..f8ea802 --- /dev/null +++ b/modules/home/git.nix @@ -0,0 +1,16 @@ +{ ... }: + +{ + programs.git = { + enable = true; + + userName = "Atridad Lahiji"; + userEmail = "me@atri.dad"; + + signing = { + key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILKb+pDgkHEKI7LDWvZbhoLJ11uJMaCmVyAqotDxNOI7 me@atri.dad"; + signByDefault = true; + format = "ssh"; + }; + }; +} diff --git a/modules/home/ssh.nix b/modules/home/ssh.nix new file mode 100644 index 0000000..b46fcd5 --- /dev/null +++ b/modules/home/ssh.nix @@ -0,0 +1,29 @@ +{ ... }: + +{ + programs.ssh = { + enable = true; + + extraConfig = '' + IdentityAgent /Users/atridad/.bitwarden-ssh-agent.sock + ''; + + matchBlocks = { + "localhost" = { + userKnownHostsFile = "/dev/null"; + }; + "tux" = { + hostname = "tuxworld.usask.ca"; + user = "atl175"; + }; + "haschel" = { + hostname = "haschel"; + user = "root"; + }; + "lloyd" = { + hostname = "lloyd"; + user = "truenas_admin"; + }; + }; + }; +} diff --git a/modules/homebrew.nix b/modules/homebrew.nix index 904b4f2..cf00dce 100644 --- a/modules/homebrew.nix +++ b/modules/homebrew.nix @@ -6,6 +6,7 @@ onActivation = { autoUpdate = true; + upgrade = true; cleanup = "zap"; }; @@ -19,10 +20,10 @@ "android-platform-tools" "flutter" "ghostty" - "zed" "librewolf" "ngrok" "pearcleaner" + "zed" "zulu@17" ]; }; diff --git a/modules/librewolf.nix b/modules/librewolf.nix new file mode 100644 index 0000000..b9e9260 --- /dev/null +++ b/modules/librewolf.nix @@ -0,0 +1,74 @@ +{ pkgs, ... }: + +let + policies = builtins.toJSON { + policies = { + DisableTelemetry = true; + DisableFirefoxStudies = true; + DisablePocket = true; + DisableFirefoxAccounts = true; + + FirefoxHome = { + Search = true; + TopSites = true; + SponsoredTopSites = false; + Highlights = false; + Pocket = false; + SponsoredPocket = false; + }; + + SanitizeOnShutdown = { + Cache = true; + Cookies = false; + History = false; + Sessions = true; + SiteSettings = false; + OfflineApps = true; + }; + + ExtensionSettings = { + "{446900e4-71c2-419f-a6a7-df9c091e268b}" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi"; + installation_mode = "force_installed"; + }; + "floccus@handmadeideas.org" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/floccus/latest.xpi"; + installation_mode = "force_installed"; + }; + "uBlock0@raymondhill.net" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + installation_mode = "force_installed"; + }; + "{15cb5e64-94bd-41aa-91cf-751bb1a84972}" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/catppuccin-macchiato-lavender2/latest.xpi"; + installation_mode = "force_installed"; + }; + }; + + Preferences = { + "browser.startup.homepage" = "about:home"; + "extensions.autoDisableScopes" = 0; + "browser.toolbars.bookmarks.visibility" = "always"; + "network.cookie.cookieBehavior" = 1; + "privacy.clearOnShutdown.cookies" = false; + "privacy.clearOnShutdown.history" = false; + "sidebar.revamp" = true; + "sidebar.verticalTabs" = true; + "sidebar.main.tools" = "bookmarks,history,tabs"; + "sidebar.visibility" = "always"; + }; + }; + }; + + policiesFile = pkgs.writeText "librewolf-policies.json" policies; +in +{ + system.activationScripts.postActivation.text = '' + DIST_DIR="/Applications/LibreWolf.app/Contents/Resources/distribution" + if [ -d "/Applications/LibreWolf.app" ]; then + mkdir -p "$DIST_DIR" + cp ${policiesFile} "$DIST_DIR/policies.json" + chmod 644 "$DIST_DIR/policies.json" + fi + ''; +}