Compare commits
8 Commits
77e4eb75fa
...
7faa4d57b3
| Author | SHA1 | Date | |
|---|---|---|---|
|
7faa4d57b3
|
|||
|
2edea89fd8
|
|||
|
02fe38c5f1
|
|||
|
68f6a120d4
|
|||
|
715bc0b493
|
|||
|
144da5d7d7
|
|||
|
b65e4cbdae
|
|||
|
1a03da12c3
|
4
Makefile
Normal file
4
Makefile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
.PHONY: nix\:build
|
||||||
|
|
||||||
|
nix\:build:
|
||||||
|
sudo darwin-rebuild switch --flake .#dart
|
||||||
@@ -43,6 +43,7 @@
|
|||||||
./modules/packages/security.nix
|
./modules/packages/security.nix
|
||||||
./modules/packages/networking.nix
|
./modules/packages/networking.nix
|
||||||
./modules/homebrew.nix
|
./modules/homebrew.nix
|
||||||
|
./modules/librewolf.nix
|
||||||
./modules/home/default.nix
|
./modules/home/default.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,10 +4,14 @@
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
|
backupFileExtension = "bak";
|
||||||
|
|
||||||
users.atridad = { pkgs, lib, ... }: {
|
users.atridad = { pkgs, lib, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./zed.nix
|
./zed.nix
|
||||||
|
./ssh.nix
|
||||||
|
./git.nix
|
||||||
|
./ghostty.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
|||||||
20
modules/home/ghostty.nix
Normal file
20
modules/home/ghostty.nix
Normal 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
20
modules/home/git.nix
Normal 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
31
modules/home/ssh.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
onActivation = {
|
onActivation = {
|
||||||
autoUpdate = true;
|
autoUpdate = true;
|
||||||
|
upgrade = true;
|
||||||
cleanup = "zap";
|
cleanup = "zap";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -19,11 +20,10 @@
|
|||||||
"android-platform-tools"
|
"android-platform-tools"
|
||||||
"flutter"
|
"flutter"
|
||||||
"ghostty"
|
"ghostty"
|
||||||
"zed"
|
|
||||||
"librewolf"
|
"librewolf"
|
||||||
"ngrok"
|
"ngrok"
|
||||||
"pearcleaner"
|
"pearcleaner"
|
||||||
"zulu@17"
|
"zed"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
109
modules/librewolf.nix
Normal file
109
modules/librewolf.nix
Normal 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
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user