Compare commits

...

8 Commits

Author SHA1 Message Date
7faa4d57b3 Finally 2026-02-16 15:45:20 -07:00
2edea89fd8 Update librewolf.nix 2026-02-16 15:32:23 -07:00
02fe38c5f1 Last try 2026-02-16 15:24:59 -07:00
68f6a120d4 Finally 2026-02-16 15:23:43 -07:00
715bc0b493 ????!!!! 2026-02-16 15:22:46 -07:00
144da5d7d7 ?!?!?!?! 2026-02-16 15:22:05 -07:00
b65e4cbdae ??? 2026-02-16 15:18:42 -07:00
1a03da12c3 Add a makefile 2026-02-16 14:34:22 -07:00
8 changed files with 191 additions and 2 deletions

4
Makefile Normal file
View File

@@ -0,0 +1,4 @@
.PHONY: nix\:build
nix\:build:
sudo darwin-rebuild switch --flake .#dart

View File

@@ -43,6 +43,7 @@
./modules/packages/security.nix
./modules/packages/networking.nix
./modules/homebrew.nix
./modules/librewolf.nix
./modules/home/default.nix
];
};

View File

@@ -4,10 +4,14 @@
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "bak";
users.atridad = { pkgs, lib, ... }: {
imports = [
./zed.nix
./ssh.nix
./git.nix
./ghostty.nix
];
home = {

20
modules/home/ghostty.nix Normal file
View File

@@ -0,0 +1,20 @@
{ pkgs, lib, ... }:
let
ghosttyStub = (pkgs.runCommand "ghostty-stub" { } "mkdir -p $out/bin")
// { meta.mainProgram = "ghostty"; };
in
{
programs.ghostty = {
enable = true;
package = lib.mkForce ghosttyStub;
enableZshIntegration = false;
enableBashIntegration = false;
settings = {
theme = "Catppuccin Macchiato";
background-opacity = "0.95";
};
};
}

20
modules/home/git.nix Normal file
View File

@@ -0,0 +1,20 @@
{ ... }:
{
programs.git = {
enable = true;
signing = {
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILKb+pDgkHEKI7LDWvZbhoLJ11uJMaCmVyAqotDxNOI7 me@atri.dad";
signByDefault = true;
format = "ssh";
};
settings = {
user = {
name = "Atridad Lahiji";
email = "me@atri.dad";
};
};
};
}

31
modules/home/ssh.nix Normal file
View File

@@ -0,0 +1,31 @@
{ ... }:
{
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
extraOptions = {
IdentityAgent = "/Users/atridad/.bitwarden-ssh-agent.sock";
};
};
"localhost" = {
userKnownHostsFile = "/dev/null";
};
"tux" = {
hostname = "tuxworld.usask.ca";
user = "atl175";
};
"haschel" = {
hostname = "haschel";
user = "root";
};
"lloyd" = {
hostname = "lloyd";
user = "truenas_admin";
};
};
};
}

View File

@@ -6,6 +6,7 @@
onActivation = {
autoUpdate = true;
upgrade = true;
cleanup = "zap";
};
@@ -19,11 +20,10 @@
"android-platform-tools"
"flutter"
"ghostty"
"zed"
"librewolf"
"ngrok"
"pearcleaner"
"zulu@17"
"zed"
];
};
}

109
modules/librewolf.nix Normal file
View File

@@ -0,0 +1,109 @@
{ pkgs, ... }:
let
policiesJson = 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" = {
Value = "about:home";
Status = "locked";
};
"extensions.autoDisableScopes" = {
Value = 0;
Status = "locked";
};
"browser.toolbars.bookmarks.visibility" = {
Value = "always";
Status = "locked";
};
"network.cookie.cookieBehavior" = {
Value = 1;
Status = "locked";
};
"privacy.clearOnShutdown.cookies" = {
Value = false;
Status = "locked";
};
"privacy.clearOnShutdown.history" = {
Value = false;
Status = "locked";
};
"sidebar.revamp" = {
Value = true;
Status = "locked";
};
"sidebar.verticalTabs" = {
Value = true;
Status = "locked";
};
"sidebar.main.tools" = {
Value = "bookmarks,history,tabs";
Status = "locked";
};
"sidebar.visibility" = {
Value = "always";
Status = "locked";
};
"extensions.activeThemeID" = {
Value = "{1d573fb2-437c-4440-9b7b-b72a3eaec105}";
Status = "locked";
};
};
};
};
policiesFile = pkgs.writeText "librewolf-policies.json" policiesJson;
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"
echo "LibreWolf policies applied."
fi
'';
}