Move firefox into module and clean useless folder

This commit is contained in:
2026-07-08 09:45:00 +02:00
parent e091288eb7
commit dee75a51e2
7 changed files with 54 additions and 71 deletions
@@ -1,8 +0,0 @@
{ ... }:
{
home.file = {
".config/ghostty/" = {
source = ./ghostty;
};
};
}
@@ -1,13 +0,0 @@
# macOS specific
macos-titlebar-style = "tabs"
# Window padding & size
window-padding-x = 8
window-padding-y = 0,2
window-height = 25
window-width = 100
# Themes
background-blur=true
background-opacity = 0.85
theme = Spacegray Eighties
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

@@ -1,19 +0,0 @@
{
config,
...
}:
let
wallpaperPath = "${config.home.homeDirectory}/.config/wallpaper/current-wallpaper.jpg";
in
{
# Create wallpaper directory and download wallpaper
home.file.".config/wallpaper/current-wallpaper.jpg" = {
source = ./walls.jpg;
};
# Set wallpaper using activation script
home.activation.setWallpaper = config.lib.dag.entryAfter [ "writeBoundary" ] ''
# Set wallpaper for all desktops using osascript
$DRY_RUN_CMD /usr/bin/osascript -e "tell application \"System Events\" to tell every desktop to set picture to \"${wallpaperPath}\""
'';
}
+3 -5
View File
@@ -27,16 +27,14 @@
# Nix & languages env deps
home.env.nix.enable = true;
home.env.jdk.enable = true;
home.env.rust.enable = true;
home.env.python.enable = true;
home.packages = [ ];
# No Home Application Folders
targets.darwin.linkApps.enable = false;
targets.darwin.copyApps.enable = false;
# Home packages
home.packages = [ ];
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "25.11";
+2 -1
View File
@@ -1,7 +1,6 @@
{ ... }:
{
system.primaryUser = "alistreaza";
nixpkgs.hostPlatform = "aarch64-darwin";
# Homebrew apps
os.homebrew.ghostty.enable = true;
@@ -12,4 +11,6 @@
os.homebrew.obsidian.enable = true;
os.homebrew.microsoft.enable = true;
os.homebrew.keka.enable = true;
nixpkgs.hostPlatform = "aarch64-darwin";
}
+49 -25
View File
@@ -5,7 +5,9 @@ let
in
{
options.home.firefox = {
enable = mkEnableOption "Ghostty service";
enable = mkEnableOption "Firefox service";
privacy = mkEnableOption "Firefox privacy service";
sanity = mkEnableOption "Sanitize Firefox on shutdown";
};
config = mkIf cfg.enable {
@@ -18,18 +20,45 @@ in
programs.firefox = {
enable = true;
languagePacks = [ "fr-FR" ];
policies = {
ExtensionSettings = {
"uBlock0@raymondhill.net" = {
default_area = "menupanel";
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
private_browsing = true;
DisablePocket = true;
ExtensionSettings =
{ }
+ mkif cfg.privacy {
"uBlock0@raymondhill.net" = {
default_area = "menupanel";
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
private_browsing = true;
};
};
};
}
+ mkif cfg.privacy {
DisableTelemetry = true;
DisableFirefoxStudies = true;
EnableTrackingProtection = true;
};
profiles.alistreaza = {
profiles.default = {
settings = {
# Vertical tabs
"sidebar.revamp" = true;
"sidebar.verticalTabs" = true;
"sidebar.new-sidebar.has-used" = true;
"sidebar.main.tools" = "history,passwords";
"sidebar.backupState" = {
"panelOpen" = true;
"launcherExpanded" = false;
"launcherVisible" = true;
};
# No bookmarks
"browser.toolbars.bookmarks.visibility" = "never";
# New tab page
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.showSponsoredCheckboxes" = false;
}
+ mkif cfg.privacy {
# Disable some telemetry
"app.shield.optoutstudies.enabled" = false;
"browser.discovery.enabled" = false;
@@ -55,25 +84,20 @@ in
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.unifiedIsOptIn" = false;
"toolkit.telemetry.updatePing.enabled" = false;
# New tab page
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.showSponsoredCheckboxes" = false;
# No bookmartks
"browser.toolbars.bookmarks.visibility" = "never";
# Vertical tabs
"sidebar.backupState" = {
"panelOpen" = true;
"launcherExpanded" = false;
"launcherVisible" = true;
}
+ mkif cfg.sanity {
# Sanitize
"SanitizeOnShutdown" = {
"Locked" = false;
"Cache" = true;
"History" = true;
"Cookies" = true;
"Sessions" = true;
"FormData" = true;
"SiteSettings" = true;
};
"sidebar.new-sidebar.has-used" = true;
"sidebar.verticalTabs" = true;
"sidebar.revamp" = true;
"sidebar.main.tools" = "history,passwords";
};
};
};
};
}