1
1
Fork 0

Compare commits

...

15 commits

Author SHA1 Message Date
cc35f93979
nix: update flake.lock
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:32:58 -06:00
9e82252347
pkgs: add lz4
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:32:49 -06:00
793b053781
rofi-rbw: fix keybindings
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:32:42 -06:00
dfe982fd3b
chromium: specify pkg in module
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:32:18 -06:00
988162bef2
rofi: fix startup speed by disabling default modes
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:32:01 -06:00
03809a4389
hyprland: modify rules
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:31:31 -06:00
b134cf9040
hyprland: modify animations
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:31:11 -06:00
f510e28376
xdg: remove gnome portal
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:30:54 -06:00
e174041e02
gnome-text-editor: use custom dconf font
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:30:37 -06:00
1ef48275f7
hyprland: switch to bitwarden
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:30:09 -06:00
7760d761c7
firefox: genericize module and switch to librewolf
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:29:08 -06:00
b88fbfbcb9
flake: pass home-manager.lib via specialArgs
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:27:33 -06:00
180f44de64
flake: upgrade firefox-gnome-theme to main branch
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:27:06 -06:00
34e4a27d9b
nix: add nur overlay
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:26:09 -06:00
4b8f74564d
programs: add zen-browser
Signed-off-by: Myned <dev@bjork.tech>
2025-02-16 20:01:08 -06:00
21 changed files with 1011 additions and 722 deletions

View file

@ -63,6 +63,11 @@
# TODO: Remove when on stable
ghostty = unstable.ghostty;
# TODO: Use official package when available
# https://github.com/NixOS/nixpkgs/issues/327982
zen-browser = inputs.zen-browser.packages.${pkgs.system}.zen-browser;
zen-browser-unwrapped = inputs.zen-browser.packages.${pkgs.system}.zen-browser-unwrapped;
### Python
# https://nixos.org/manual/nixpkgs/unstable/#how-to-override-a-python-package-for-all-python-versions-using-extensions
#?? PKG = pyprev.PKG.overridePythonAttrs {};
@ -171,6 +176,7 @@
};
users = {
# FIXME: Separate root from sharedModules
root = {
# Inherit from user
programs.home-manager.enable = config.home-manager.users.${config.custom.username}.programs.home-manager.enable;

View file

@ -34,6 +34,7 @@
home-manager-stable = flake "github:nix-community/home-manager/release-24.11" // stable "nixpkgs";
nix-index-database-stable = flake "github:nix-community/nix-index-database" // stable "nixpkgs";
nixgl-stable = flake "github:nix-community/nixGL" // stable "nixpkgs";
nur-stable = flake "github:nix-community/NUR" // stable "nixpkgs";
stylix-stable = flake "github:danth/stylix/release-24.11" // stable "nixpkgs";
### Unstable
@ -66,15 +67,17 @@
nix-vscode-extensions = flake "github:nix-community/nix-vscode-extensions" // unstable "nixpkgs";
nixd = flake "github:nix-community/nixd" // unstable "nixpkgs";
nixgl-unstable = flake "github:nix-community/nixGL" // unstable "nixpkgs";
nur-unstable = flake "github:nix-community/NUR" // unstable "nixpkgs";
stylix-unstable = flake "github:danth/stylix" // unstable "nixpkgs";
walker = flake "github:abenz1267/walker?ref=v0.12.8" // unstable "nixpkgs";
zen-browser = flake "github:youwen5/zen-browser-flake" // unstable "nixpkgs";
### Branches
nixpkgs-master = flake "github:NixOS/nixpkgs/master";
### Source code
cisco-packettracer8 = source "file:///home/myned/SYNC/linux/config/cisco/CiscoPacketTracer822_amd64_signed.deb";
firefox-gnome-theme = source "github:rafaelmardojai/firefox-gnome-theme/v128";
firefox-gnome-theme = source "github:rafaelmardojai/firefox-gnome-theme";
lifx-cli = source "github:Rawa/lifx-cli";
steamtinkerlaunch = source "github:sonic2kk/steamtinkerlaunch";
thunderbird-gnome-theme = source "github:rafaelmardojai/thunderbird-gnome-theme";
@ -95,33 +98,37 @@
#!! There is no default nixpkgs, inputs.<nixpkgs|home-manager>-BRANCH must exist
#?? branch = common "BRANCH" "ARCHITECTURE" [ MODULES ]
common = branch: arch: modules:
inputs."nixpkgs-${branch}".lib.nixosSystem {
system = arch;
specialArgs = {inherit inputs;};
with inputs."nixpkgs-${branch}".lib;
nixosSystem {
system = arch;
# TODO: Clean up optional attributes with each new release
#!! Options will diverge between branches over time
#?? with lib; optionalAttrs (versionAtLeast version "VERSION") { ... };
modules =
modules
++ [
./options
./configuration.nix
specialArgs = {
inherit inputs;
#!! Avoid globally importing modules that are not guarded by .enable
# https://github.com/NixOS/nixpkgs/issues/137168
(
{
inputs,
lib,
...
}:
with lib; {
# Pass home-manager lib through nixpkgs lib
#?? lib.home-manager.*
lib = recursiveUpdate inputs."nixpkgs-${branch}".lib {home-manager = inputs."home-manager-${branch}".lib;};
};
# TODO: Clean up optional attributes with each new release
#!! Options will diverge between branches over time
#?? with lib; optionalAttrs (versionAtLeast version "VERSION") { ... };
modules =
modules
++ [
./options
./configuration.nix
#!! Avoid globally importing modules that are not guarded by .enable
# https://github.com/NixOS/nixpkgs/issues/137168
(
{inputs, ...}: {
imports =
[
inputs."aagl-gtk-on-nix-${branch}".nixosModules.default
inputs."home-manager-${branch}".nixosModules.home-manager
inputs."nix-index-database-${branch}".nixosModules.nix-index
inputs."nur-${branch}".modules.nixos.default
inputs."stylix-${branch}".nixosModules.stylix
inputs.agenix.nixosModules.default
inputs.arion.nixosModules.arion
@ -140,6 +147,30 @@
inputs.anyrun.homeManagerModules.default
inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.walker.homeManagerModules.default
# TODO: Use official module when supported
# https://github.com/nix-community/home-manager/blob/master/modules/programs/floorp.nix
(let
modulePath = ["programs" "zen-browser"];
mkFirefoxModule = import "${inputs."home-manager-${branch}"}/modules/programs/firefox/mkFirefoxModule.nix";
in
mkFirefoxModule {
inherit modulePath;
name = "Zen";
wrappedPackageName = "zen-browser";
unwrappedPackageName = "zen-browser-unwrapped";
visible = true;
platforms.linux = {
configPath = ".zen";
vendorPath = ".mozilla";
};
platforms.darwin = {
configPath = "Library/Application Support/Zen";
vendorPath = "Library/Application Support/Mozilla";
};
})
];
# Branch-specific overlays
@ -147,9 +178,9 @@
inputs."nixgl-${branch}".overlays.default
];
}
)
];
};
)
];
};
#?? system = branch "ARCHITECTURE" [ MODULES ]
stable = arch: modules: common "stable" "${arch}-linux" modules;

162
flake.lock generated
View file

@ -675,16 +675,15 @@
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1721054065,
"narHash": "sha256-zB+Zd0V0ayKP/zg9n1MQ8J/Znwa49adylRftxuc694k=",
"lastModified": 1739223196,
"narHash": "sha256-vAxN2f3rvl5q62gQQjZGVSvF93nAsOxntuFz+e/655w=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "c36cd1a35062ef0f7e37ff904e94e50d3c84373c",
"rev": "a89108e6272426f4eddd93ba17d0ea101c34fb21",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"ref": "v128",
"repo": "firefox-gnome-theme",
"type": "github"
}
@ -996,6 +995,48 @@
}
},
"flake-parts_5": {
"inputs": {
"nixpkgs-lib": [
"nur-stable",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_6": {
"inputs": {
"nixpkgs-lib": [
"nur-unstable",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_7": {
"inputs": {
"nixpkgs-lib": [
"walker",
@ -3009,6 +3050,50 @@
"type": "github"
}
},
"nur-stable": {
"inputs": {
"flake-parts": "flake-parts_5",
"nixpkgs": [
"nixpkgs-stable"
],
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1739738009,
"narHash": "sha256-e8xhem64JzqPBpCVtGAL+Qh//xmMCE9o7ykDA7OLgx0=",
"owner": "nix-community",
"repo": "NUR",
"rev": "6ac541510c7a0635d958a40df23dafe693922aea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"nur-unstable": {
"inputs": {
"flake-parts": "flake-parts_6",
"nixpkgs": [
"nixpkgs-unstable"
],
"treefmt-nix": "treefmt-nix_3"
},
"locked": {
"lastModified": 1739738009,
"narHash": "sha256-e8xhem64JzqPBpCVtGAL+Qh//xmMCE9o7ykDA7OLgx0=",
"owner": "nix-community",
"repo": "NUR",
"rev": "6ac541510c7a0635d958a40df23dafe693922aea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"onchg": {
"inputs": {
"nix-pre-commit": "nix-pre-commit",
@ -3140,12 +3225,15 @@
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-stable": "nixpkgs-stable_5",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur-stable": "nur-stable",
"nur-unstable": "nur-unstable",
"steamtinkerlaunch": "steamtinkerlaunch",
"stylix-stable": "stylix-stable",
"stylix-unstable": "stylix-unstable",
"thunderbird-gnome-theme": "thunderbird-gnome-theme",
"virtio-win": "virtio-win",
"walker": "walker"
"walker": "walker",
"zen-browser": "zen-browser"
}
},
"rust-analyzer-src": {
@ -3665,6 +3753,48 @@
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"nur-stable",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733222881,
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_3": {
"inputs": {
"nixpkgs": [
"nur-unstable",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733222881,
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"virtio-win": {
"flake": false,
"locked": {
@ -3679,7 +3809,7 @@
},
"walker": {
"inputs": {
"flake-parts": "flake-parts_5",
"flake-parts": "flake-parts_7",
"nixpkgs": [
"nixpkgs-unstable"
],
@ -3773,6 +3903,26 @@
"repo": "xwayland-satellite",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1739222645,
"narHash": "sha256-6FsTAjrO0TN5+gVxx3hmWqEJWs1sJ1p3E8DKWHdlN6M=",
"owner": "youwen5",
"repo": "zen-browser-flake",
"rev": "7e60ade066a54797b376ebaf554bc2efa255ff8a",
"type": "github"
},
"original": {
"owner": "youwen5",
"repo": "zen-browser-flake",
"type": "github"
}
}
},
"root": "root",

View file

@ -48,7 +48,7 @@
};
firefox-gnome-theme = {
flake = false;
url = "github:rafaelmardojai/firefox-gnome-theme/v128";
url = "github:rafaelmardojai/firefox-gnome-theme";
};
flakegen.url = "github:jorsn/flakegen";
fw-fanctrl = {
@ -140,6 +140,14 @@
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nur-stable = {
inputs.nixpkgs.follows = "nixpkgs-stable";
url = "github:nix-community/NUR";
};
nur-unstable = {
inputs.nixpkgs.follows = "nixpkgs-unstable";
url = "github:nix-community/NUR";
};
steamtinkerlaunch = {
flake = false;
url = "github:sonic2kk/steamtinkerlaunch";
@ -164,6 +172,10 @@
inputs.nixpkgs.follows = "nixpkgs-unstable";
url = "github:abenz1267/walker?ref=v0.12.8";
};
zen-browser = {
inputs.nixpkgs.follows = "nixpkgs-unstable";
url = "github:youwen5/zen-browser-flake";
};
};
outputs = inputs: inputs.flakegen ./flake.in.nix inputs;
}

578
modules/firefox.nix Normal file
View file

@ -0,0 +1,578 @@
{
config,
inputs,
lib,
pkgs,
theme ? true,
...
}:
with lib; {
#!! Creates package derivation
#?? hm.programs.firefox.finalPackage
enableGnomeExtensions = config.services.gnome.gnome-browser-connector.enable;
# https://wiki.nixos.org/wiki/Firefox#Tips
nativeMessagingHosts = with pkgs; [
firefoxpwa
];
#!! Prefer policies over profiles when possible
#?? about:profiles
profiles.default = {
# https://nur.nix-community.org/repos/rycee/
extensions = with pkgs.nur.repos.rycee.firefox-addons;
optionals config.custom.minimal [
ublock-origin
]
++ optionals config.custom.full [
awesome-rss
#// betterttv
bitwarden
enhancer-for-youtube
#// firefox-color
#// gnome-shell-integration
#// improved-tube
libredirect
#// onepassword-password-manager
pwas-for-firefox
#// simple-tab-groups
sponsorblock
stylus
#// untrap-for-youtube
#// user-agent-string-switcher
# TODO: Convert to NUR addons
#// "{248e6a49-f636-4c81-9899-a456eb6291a8}" = extension "ground-news-bias-checker"; # Ground News Bias Checker
#// "select-after-closing-current@qw.linux-2g64.local" = extension "select-after-closing-current"; # Select After Closing Current
#// "myallychou@gmail.com" = extension "youtube-recommended-videos"; # Unhook: Remove YouTube Recommended Videos Comments
#// "{a0370179-acc3-452f-9530-246b6adb2768}" = extension "svelte-devtools"; # Svelte Devtools
#// "{c49b13b1-5dee-4345-925e-0c793377e3fa}" = extension "youtube-enhancer-vc"; # YouTube Enhancer
];
# TODO: Consider other themes
# https://github.com/soulhotel/FF-ULTIMA
# Import CSS theme with solarized overrides
# https://github.com/rafaelmardojai/firefox-gnome-theme
# https://github.com/rafaelmardojai/firefox-gnome-theme/blob/master/theme/colors/dark.css
userContent = mkIf theme ''
@import "${inputs.firefox-gnome-theme}/userContent.css";
'';
userChrome = mkIf theme ''
@import "${inputs.firefox-gnome-theme}/userChrome.css";
:root {
--gnome-accent: #d33682;
--gnome-window-background: #002b36;
--gnome-window-color: #93a1a1;
--gnome-view-background: #073642;
--gnome-sidebar-background: #002b36;
--gnome-secondary-sidebar-background: #002b36;
--gnome-menu-background: #073642;
--gnome-headerbar-background: #002b36;
--gnome-toolbar-icon-fill: #93a1a1;
--gnome-tabbar-tab-hover-background: #073642;
--gnome-tabbar-tab-active-background: #073642;
--gnome-tabbar-tab-active-hover-background: #073642;
}
:root:-moz-window-inactive {
--gnome-inactive-entry-color: #586e75;
--gnome-tabbar-tab-hover-background: #073642;
--gnome-tabbar-tab-active-background: #073642;
}
/* Center bookmarks */
#PlacesToolbarItems {
justify-content: center;
}
/* Disable bookmark folder icons */
.bookmark-item[container] > .toolbarbutton-icon {
display: none;
}
'';
containersForce = true;
containers = {
Master = {
color = "pink";
icon = "circle";
id = 0;
};
Edu = {
color = "orange";
icon = "fruit";
id = 1;
};
};
settings = with config.custom.settings.fonts;
{
"accessibility.browsewithcaret" = false;
"accessibility.typeaheadfind" = false;
"browser.aboutConfig.showWarning" = false;
"browser.bookmarks.restore_default_bookmarks" = false;
"browser.contentblocking.category" = "standard";
"browser.contentblocking.report.hide_vpn_banner" = true;
"browser.contentblocking.report.show_mobile_app" = false;
"browser.contentblocking.report.vpn.enabled" = false;
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
"browser.ctrlTab.sortByRecentlyUsed" = false;
"browser.dataFeatureRecommendations.enabled" = false;
"browser.download.always_ask_before_handling_new_types" = false;
"browser.download.useDownloadDir" = true;
"browser.engagement.ctrlTab.has-used" = true;
"browser.engagement.downloads-button.has-used" = true;
"browser.engagement.fxa-toolbar-menu-button.has-used" = true;
"browser.engagement.home-button.has-used" = true;
"browser.engagement.library-button.has-used" = true;
"browser.engagement.sidebar-button.has-used" = true;
"browser.formfill.enable" = false;
"browser.link.open_newwindow.restriction" = 0; # Popups in new tab
"browser.link.open_newwindow" = 3; # New tab
"browser.messaging-system.whatsNewPanel.enabled" = false;
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false;
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false;
"browser.newtabpage.activity-stream.discoverystream.onboardingExperience.enabled" = false;
"browser.newtabpage.activity-stream.discoverystream.topicSelection.onboarding.enabled" = false;
"browser.newtabpage.activity-stream.feeds.recommendationprovider" = false;
"browser.newtabpage.activity-stream.feeds.section.highlights" = false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.feeds.system.topstories" = false;
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.newtabpage.activity-stream.showSearch" = false;
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.showWeather" = false;
"browser.newtabpage.activity-stream.telemetry" = false;
"browser.newtabpage.enabled" = true;
"browser.ping-centre.telemetry" = false;
"browser.preferences.defaultPerformanceSettings.enabled" = true;
"browser.preferences.moreFromMozilla" = false;
"browser.quitShortcut.disabled" = true;
"browser.safebrowsing.blockedURIs.enabled" = true;
"browser.safebrowsing.downloads.enabled" = true;
"browser.safebrowsing.malware.enabled" = true;
"browser.safebrowsing.phishing.enabled" = true;
"browser.search.separatePrivateDefault" = false;
"browser.search.suggest.enabled" = true;
"browser.search.widget.inNavBar" = false;
"browser.shell.checkDefaultBrowser" = false;
"browser.startup.homepage" = "about:home";
"browser.startup.page" = 3; # Previous session
"browser.tabs.allowTabDetach" = false;
"browser.tabs.closeTabByDblclick" = true;
"browser.tabs.closeWindowWithLastTab" = false;
"browser.tabs.groups.enabled" = true;
"browser.tabs.insertAfterCurrent" = false;
"browser.tabs.insertRelatedAfterCurrent" = false;
"browser.tabs.loadInBackground" = true;
"browser.tabs.warnOnClose" = false;
"browser.tabs.warnOnCloseOtherTabs" = false;
"browser.theme.dark-private-windows" = false;
"browser.toolbars.bookmarks.showOtherBookmarks" = false;
"browser.uidensity" = 0; # Default
"browser.urlbar.quicksuggest.dataCollection.enabled" = false;
"browser.urlbar.quicksuggest.shouldShowOnboardingDialog" = false;
"browser.urlbar.suggest.addons" = true;
"browser.urlbar.suggest.bookmark" = true;
"browser.urlbar.suggest.calculator" = true;
"browser.urlbar.suggest.clipboard" = true;
"browser.urlbar.suggest.engines" = true;
"browser.urlbar.suggest.fakespot" = true;
"browser.urlbar.suggest.history" = true;
"browser.urlbar.suggest.mdn" = true;
"browser.urlbar.suggest.openpage" = true;
"browser.urlbar.suggest.pocket" = false;
"browser.urlbar.suggest.quickactions" = true;
"browser.urlbar.suggest.quicksuggest.nonsponsored" = true;
"browser.urlbar.suggest.quicksuggest.sponsored" = false;
"browser.urlbar.suggest.recentsearches" = true;
"browser.urlbar.suggest.remotetab" = true;
"browser.urlbar.suggest.searches" = true;
"browser.urlbar.suggest.topsites" = true;
"browser.urlbar.suggest.trending" = false;
"browser.urlbar.suggest.weather" = false;
"browser.urlbar.suggest.yelp" = false;
"browser.warnOnQuitShortcut" = true;
"clipboard.autocopy" = false;
"default-browser-agent.enabled" = false;
"devtools.webconsole.input.editorOnboarding" = false;
"dom.security.https_only_mode" = true;
"extensions.autoDisableScopes" = 0; # Auto-enable extensions
"extensions.formautofill.addresses.enabled" = false;
"extensions.formautofill.creditCards.enabled" = false;
"extensions.htmlaboutaddons.recommendations.enabled" = false;
"extensions.pictureinpicture.enable_picture_in_picture_overrides" = true;
"extensions.pocket.enabled" = false;
"extensions.update.autoUpdateDefault" = true;
"extensions.update.enabled" = true;
"font.default.x-unicode" = sans-serif;
"font.default.x-western" = sans-serif;
"font.name-list.emoji" = emoji; # System emoji
"font.name.monospace.x-unicode" = monospace;
"font.name.monospace.x-western" = monospace;
"font.name.sans-serif.x-unicode" = sans-serif;
"font.name.sans-serif.x-western" = sans-serif;
"font.name.serif.x-unicode" = sans-serif;
"font.name.serif.x-western" = sans-serif;
"full-screen-api.ignore-widgets" = false; # Fake fullscreen
"full-screen-api.warning.delay" = -1;
"full-screen-api.warning.timeout" = 0;
"general.autoScroll" = false;
"general.smoothScroll" = true;
"gfx.webrender.software" = config.custom.programs.looking-glass.igpu; # Reduce load on iGPU
"identity.fxaccounts.enabled" = true;
"layers.acceleration.force-enabled" = true;
"layout.css.always_underline_links" = false;
"layout.css.backdrop-filter.enabled" = true;
"layout.forms.reveal-password-button.enabled" = true;
"layout.forms.reveal-password-context-menu.enabled" = false;
"layout.spellcheckDefault" = 0; # Disabled
"media.autoplay.blocking_policy" = 1; # Transient
"media.eme.enabled" = true; # DRM
"media.ffmpeg.vaapi.enabled" = true;
"media.hardware-video-decoding.enabled" = true;
"media.hardwaremediakeys.enabled" = true;
"media.videocontrols.picture-in-picture.audio-toggle.enabled" = false;
"media.videocontrols.picture-in-picture.display-text-tracks.enabled" = true;
"media.videocontrols.picture-in-picture.display-text-tracks.toggle.enabled" = true;
"media.videocontrols.picture-in-picture.enable-when-switching-tabs.enabled" = true;
"media.videocontrols.picture-in-picture.enabled" = true;
"media.videocontrols.picture-in-picture.respect-disablePictureInPicture" = false;
"media.videocontrols.picture-in-picture.urlbar-button.enabled" = true;
"media.videocontrols.picture-in-picture.video-toggle.enabled" = true;
"media.videocontrols.picture-in-picture.video-toggle.has-used" = true;
"media.videocontrols.picture-in-picture.video-toggle.min-video-secs" = 0; # No minimum duration
"media.videocontrols.picture-in-picture.video-toggle.position" = "top";
"messaging-system.askForFeedback" = false;
"messaging-system.rsexperimentloader.enabled" = false;
"middlemouse.paste" = false;
"network.dns.disableIPv6" = false;
"network.dns.disablePrefetch" = true;
"network.dns.disablePrefetchFromHTTPS" = true;
"network.http.referer.XOriginPolicy" = 0; # Relaxed
"network.predictor.enabled" = false;
"pref.privacy.disable_button.view_passwords" = true;
"privacy.fingerprintingProtection" = false;
"privacy.globalprivacycontrol.enabled" = true;
"privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts" = false;
"privacy.resistFingerprinting.letterboxing" = false;
"privacy.resistFingerprinting" = false; #!! Forces light theme
"remote.prefs.recommended" = false;
"security.OCSP.require" = true;
"security.protectionspopup.recordEventTelemetry" = false;
"services.passwordSavingEnabled" = false;
"startup.homepage_override_url" = ""; # Disable
"startup.homepage_welcome_url" = ""; # Disable
"svg.context-properties.content.enabled" = true; # Dark theme icons
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"toolkit.telemetry.archive.enabled" = false;
"toolkit.telemetry.bhrPing.enabled" = false;
"toolkit.telemetry.coverage.opt-out" = true;
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.firstShutdownPing.enabled" = false;
"toolkit.telemetry.newProfilePing.enabled" = false;
"toolkit.telemetry.pioneer-new-studies-available" = false;
"toolkit.telemetry.shutdownPingSender.enabled" = false;
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.updatePing.enabled" = false;
"ui.key.menuAccessKey" = 0; # Disable menu key
"webgl.disabled" = false;
"widget.gtk.overlay-scrollbars.enabled" = true;
"widget.gtk.rounded-bottom-corners.enabled" = true;
}
// optionalAttrs theme {
# https://github.com/rafaelmardojai/firefox-gnome-theme?tab=readme-ov-file#features
"gnomeTheme.allTabsButtonOnOverflow" = true;
"gnomeTheme.bookmarksToolbarUnderTabs" = true;
};
bookmarks = [
{
name = "Nix User Repository";
keyword = "nur";
url = "https://nur.nix-community.org/";
}
{
name = "Nix Ryantm";
keyword = "nry";
url = "https://ryantm.github.io/nixpkgs/";
}
];
# https://searchfox.org/mozilla-central/rev/669329e284f8e8e2bb28090617192ca9b4ef3380/toolkit/components/search/SearchEngine.jsm#1138-1177
search = {
force = true;
default = "Kagi";
privateDefault = "Kagi";
engines = {
### Builtins
"Amazon.com" = {
metaData.hidden = true;
};
"Bing" = {
metaData.hidden = true;
};
"DuckDuckGo" = {
metaData.alias = "d";
};
"eBay" = {
metaData.hidden = true;
};
"Google" = {
metaData.alias = "g";
};
"Wikipedia (en)" = {
metaData.hidden = true;
};
### Custom
"Amazon" = {
definedAliases = ["a"];
iconUpdateURL = "https://www.amazon.com/favicon.ico";
urls = [{template = "https://www.amazon.com/s?k={searchTerms}";}];
};
"ArchWiki" = {
definedAliases = ["aw"];
iconUpdateURL = "https://wiki.archlinux.org/favicon.ico";
urls = [{template = "https://wiki.archlinux.org/index.php?search={searchTerms}";}];
};
"Brave" = {
definedAliases = ["b"];
iconUpdateURL = "https://cdn.search.brave.com/serp/v2/_app/immutable/assets/favicon.c09fe1a1.ico";
urls = [{template = "https://search.brave.com/search?q={searchTerms}";}];
};
"Docker Hub" = {
definedAliases = ["dh"];
iconUpdateURL = "https://hub.docker.com/favicon.ico";
urls = [{template = "https://hub.docker.com/search?q={searchTerms}";}];
};
"e621" = {
definedAliases = ["e"];
iconUpdateURL = "https://e621.net/favicon.ico";
urls = [{template = "https://e621.net/posts?tags={searchTerms}";}];
};
"Element Issues" = {
definedAliases = ["ei"];
iconUpdateURL = "https://github.com/favicon.ico";
urls = [{template = "https://github.com/element-hq/element-web/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";}];
};
"Flathub" = {
definedAliases = ["fh"];
iconUpdateURL = "https://flathub.org/favicon.png";
urls = [{template = "https://flathub.org/apps/search?q={searchTerms}";}];
};
"Google Fonts" = {
definedAliases = ["gf"];
iconUpdateURL = "https://www.gstatic.com/images/icons/material/apps/fonts/1x/catalog/v5/favicon.svg";
urls = [{template = "https://fonts.google.com/?query={searchTerms}";}];
};
"GitHub" = {
definedAliases = ["gh"];
iconUpdateURL = "https://github.com/favicon.ico";
urls = [{template = "https://github.com/search?q={searchTerms}";}];
};
"Home Manager Issues" = {
definedAliases = ["hi"];
iconUpdateURL = "https://github.com/favicon.ico";
urls = [{template = "https://github.com/nix-community/home-manager/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";}];
};
"Home Manager Options" = {
definedAliases = ["ho"];
iconUpdateURL = "https://home-manager-options.extranix.com/images/favicon.png";
urls = [{template = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master";}];
};
"Hyprland Issues" = {
definedAliases = ["hyi"];
iconUpdateURL = "https://github.com/favicon.ico";
urls = [{template = "https://github.com/hyprwm/Hyprland/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";}];
};
"i3 Issues" = {
definedAliases = ["ii"];
iconUpdateURL = "https://github.com/favicon.ico";
urls = [{template = "https://github.com/i3/i3/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";}];
};
"Kagi" = {
definedAliases = ["k"];
iconUpdateURL = "https://kagi.com/asset/v2/favicon-32x32.png";
urls = [{template = "https://kagi.com/search?q={searchTerms}";}];
};
"Lutris" = {
definedAliases = ["l"];
iconUpdateURL = "https://lutris.net/favicon.ico";
urls = [{template = "https://lutris.net/games?q={searchTerms}";}];
};
"Lix Issues" = {
definedAliases = ["li"];
iconUpdateURL = "https://git.lix.systems/assets/img/favicon.png";
urls = [{template = "https://git.lix.systems/lix-project/lix/issues?state=open&q={searchTerms}";}];
};
"Mozilla Web Docs" = {
definedAliases = ["mdn"];
iconUpdateURL = "https://developer.mozilla.org/favicon-48x48.cbbd161b.png";
urls = [{template = "https://developer.mozilla.org/en-US/search?q={searchTerms}";}];
};
"MyNixOS Options" = {
definedAliases = ["mno"];
iconUpdateURL = "https://mynixos.com/favicon.ico";
urls = [{template = "https://mynixos.com/search?q=option+{searchTerms}";}];
};
"Nix Dev" = {
definedAliases = ["nd"];
iconUpdateURL = "https://nix.dev/manual/nix/latest/favicon.png";
urls = [{template = "https://nix.dev/manual/nix/latest?search={searchTerms}";}];
};
"NixOS Flakes" = {
definedAliases = ["nf"];
iconUpdateURL = "https://nixos.org/favicon.png";
urls = [{template = "https://search.nixos.org/flakes?channel=unstable&query={searchTerms}";}];
};
"Nix Hub" = {
definedAliases = ["nh"];
iconUpdateURL = "https://www.nixhub.io/favicon.ico";
urls = [{template = "https://www.nixhub.io/search?q={searchTerms}";}];
};
"NixOS Nixpkgs Issues" = {
definedAliases = ["ni"];
iconUpdateURL = "https://github.com/favicon.ico";
urls = [{template = "https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";}];
};
"Nix PR" = {
definedAliases = ["npr"];
urls = [{template = "https://nixpk.gs/pr-tracker.html?pr={searchTerms}";}];
};
"NixOS Options" = {
definedAliases = ["no"];
iconUpdateURL = "https://nixos.org/favicon.png";
urls = [{template = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";}];
};
"Noogle Dev" = {
definedAliases = ["nod"];
iconUpdateURL = "https://noogle.dev/favicon.png";
urls = [{template = "https://noogle.dev/q?term={searchTerms}";}];
};
"NixOS Packages" = {
definedAliases = ["np"];
iconUpdateURL = "https://nixos.org/favicon.png";
urls = [{template = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";}];
};
"Niri Issues" = {
definedAliases = ["nri"];
iconUpdateURL = "https://github.com/favicon.ico";
urls = [{template = "https://github.com/YaLTeR/niri/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";}];
};
"NixOS Wiki" = {
definedAliases = ["nw"];
iconUpdateURL = "https://wiki.nixos.org/favicon.ico";
urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}];
};
"Piped" = {
definedAliases = ["p"];
iconUpdateURL = "https://piped.${config.custom.domain}/favicon.ico";
urls = [{template = "https://piped.${config.custom.domain}/results?search_query={searchTerms}";}];
};
"PCGamingWiki" = {
definedAliases = ["pc"];
iconUpdateURL = "https://static.pcgamingwiki.com/favicons/pcgamingwiki.png";
urls = [{template = "https://www.pcgamingwiki.com/w/index.php?search={searchTerms}";}];
};
"ProtonDB" = {
definedAliases = ["pdb"];
iconUpdateURL = "https://www.protondb.com/sites/protondb/images/favicon.ico";
urls = [{template = "https://www.protondb.com/search?q={searchTerms}";}];
};
"PyPI" = {
definedAliases = ["pip"];
iconUpdateURL = "https://pypi.org/static/images/favicon.35549fe8.ico";
urls = [{template = "https://pypi.org/search/?q={searchTerms}";}];
};
"Reddit" = {
definedAliases = ["r"];
iconUpdateURL = "https://www.redditstatic.com/desktop2x/img/favicon/favicon-96x96.png";
urls = [{template = "https://kagi.com/search?q=site%3Areddit.com+{searchTerms}";}];
};
"SearXNG" = {
definedAliases = ["s"];
iconUpdateURL = "https://search.${config.custom.domain}/static/themes/simple/img/favicon.png";
urls = [{template = "https://search.${config.custom.domain}/search?q={searchTerms}";}];
};
"Sway Issues" = {
definedAliases = ["si"];
iconUpdateURL = "https://github.com/favicon.ico";
urls = [{template = "https://github.com/swaywm/sway/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";}];
};
"Wikipedia" = {
definedAliases = ["w"];
iconUpdateURL = "https://en.wikipedia.org/static/favicon/wikipedia.ico";
urls = [{template = "https://en.wikipedia.org/w/index.php?search={searchTerms}";}];
};
"Wolfram Alpha" = {
definedAliases = ["wa"];
iconUpdateURL = "https://www.wolframalpha.com/_next/static/images/favicon_1zbE9hjk.ico";
urls = [{template = "https://www.wolframalpha.com/input?i={searchTerms}";}];
};
"Walker Issues" = {
definedAliases = ["wi"];
iconUpdateURL = "https://github.com/favicon.ico";
urls = [{template = "https://github.com/abenz1267/walker/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";}];
};
"YouTube" = {
definedAliases = ["y"];
iconUpdateURL = "https://www.youtube.com/s/desktop/f8c8418d/img/favicon.ico";
urls = [{template = "https://www.youtube.com/results?search_query={searchTerms}";}];
};
};
};
};
}

View file

@ -6,6 +6,7 @@
}:
with lib; let
cfg = config.custom;
hm = config.home-manager.users.${config.custom.username};
in {
options.custom = {
### Profiles
@ -30,7 +31,7 @@ in {
hidpi = mkOption {default = cfg.scale > 1;};
scale = mkOption {default = 1;};
border = mkOption {default = 3;};
gap = mkOption {default = 10;};
gap = mkOption {default = 15;};
padding = mkOption {default = 51;}; # ?? journalctl --user -u waybar.service | grep height:
rounding = mkOption {default = 15;};
@ -48,18 +49,8 @@ in {
browser = {
# TODO: Use lib.getExe' instead of /bin/ where possible
# HACK: Find first matching package in final home-manager list
command = mkOption {
default = "${lib.findFirst (pkg:
if (lib.hasAttr "pname" pkg)
then pkg.pname == "brave"
else false)
null
config.home-manager.users.${config.custom.username}.home.packages}/bin/brave";
};
desktop = mkOption {default = "brave.desktop";};
package = mkOption {default = pkgs.brave;};
command = mkOption {default = getExe hm.programs.librewolf.finalPackage;};
desktop = mkOption {default = "librewolf.desktop";};
};
};
}

View file

@ -204,7 +204,7 @@ in {
(key "M" "Super+Shift" "movetoworkspacesilent" "special:music")
(key "O" "Super" "exec" "${hyprpicker} --autocopy")
(key "O" "Super+Shift" "exec" "${hyprpicker} --autocopy --format rgb")
(key "P" "Ctrl+Alt" "exec" "${pkill} --exact 1password")
(key "P" "Ctrl+Alt" "exec" "${pkill} --exact bitwarden-desktop")
(key "P" "Super" "togglespecialworkspace" "password")
(key "P" "Super+Shift" "movetoworkspacesilent" "special:password")
(key "Q" "Ctrl+Alt" "exec" "${hyprctl} kill")

View file

@ -49,11 +49,7 @@ in {
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
];
extraPortals = [pkgs.xdg-desktop-portal-gtk];
};
home-manager.sharedModules = [

View file

@ -8,7 +8,7 @@ with lib; let
cfg = config.custom.desktops.hyprland.rules;
hm = config.home-manager.users.${config.custom.username};
_1password = getExe config.programs._1password-gui.package;
bitwarden-desktop = getExe pkgs.bitwarden-desktop;
ghostty = getExe hm.programs.ghostty.package;
launch = hm.home.file.".local/bin/launch".source;
libreoffice = getExe config.custom.programs.libreoffice.package;
@ -36,12 +36,18 @@ in {
"special:game, on-created-empty:${command steam}"
"special:music, on-created-empty:${command youtube-music}"
"special:office, on-created-empty:${command "${launch} --workspace special:office --empty --tile -- ${libreoffice}"}"
"special:password, on-created-empty:${command "${launch} --workspace special:password --empty ${_1password}"}"
"special:terminal, on-created-empty:${command ghostty}"
"special:vault, on-created-empty:${command "${launch} --workspace special:vault --empty ${bitwarden-desktop}"}"
"special:vm, on-created-empty:${command "${launch} --workspace special:vm --empty ${virt-manager}"}"
"special:wallpaper, on-created-empty:${command "${loupe} /tmp/wallpaper.png"}"
];
# https://wiki.hyprland.org/Configuring/Window-Rules/#layer-rules
#?? layerrule = RULE, <NAMESPACE|ADDRESS>
layerrule = [
"noanim, rofi"
];
# https://wiki.hyprland.org/Configuring/Window-Rules
#?? windowrulev2 = RULE, WINDOW
windowrulev2 = with config.custom; let
@ -209,7 +215,9 @@ in {
(class "^chromium-browser$" rules)
(class "^firefox.*$" rules)
(class "^google-chrome$" rules)
(class "^librewolf$" rules)
(class "^vivaldi.*$" rules)
(class "^zen$" rules)
];
clipboard = rules: [
@ -254,11 +262,6 @@ in {
(class "ONLYOFFICE Desktop Editors" rules)
];
password = rules: [
(class "1Password" rules)
(class "Bitwarden" rules)
];
pip = rules: [
(title "Picture.in.[Pp]icture" rules)
];
@ -283,6 +286,11 @@ in {
(class "org\\.wezfurlong\\.wezterm" rules)
];
vault = rules: [
(class "1Password" rules)
(class "Bitwarden" rules)
];
vm = rules: [
(class "(sdl-|wl|x)freerdp" (rules ++ ["nomaxsize" "tile"]))
(class "looking-glass-client" (rules ++ ["plugin:hyprbars:nobar"]))
@ -302,18 +310,18 @@ in {
(tag "scroller:pinned" ["bordercolor rgb(fdf6e3) rgb(fdf6e300)"])
(t.android ["float" "idleinhibit always" "move ${android.x} ${android.y}" "size ${android.w} ${android.h}" "workspace special:android silent" "plugin:hyprbars:nobar"])
(t.browser ["workspace 1"])
(t.browser ["workspace 1" "plugin:scroller:group browser"])
(t.clipboard ["float" "move ${clipboard.x} ${clipboard.y}" "pin" "size ${clipboard.w} ${clipboard.h}" "stayfocused" "plugin:hyprbars:nobar"])
(t.dropdown ["float" "move ${dropdown.x} ${dropdown.y}" "pin" "size ${dropdown.w} ${dropdown.h}" "plugin:hyprbars:nobar"])
(t.game ["focusonactivate" "idleinhibit always" "noborder" "noshadow" "renderunfocused" "workspace name:game" "plugin:hyprbars:nobar"])
(t.media ["center" "float" "keepaspectratio" "size <90% <90%"])
(t.music ["workspace special:music silent"])
#// (t.media ["center" "float" "keepaspectratio" "size <90% <90%"])
(t.music ["workspace special:music silent" "plugin:scroller:group music"])
(t.office ["workspace special:office silent" "plugin:scroller:group office"])
(t.password ["workspace special:password silent" "plugin:hyprbars:nobar"])
(t.pip ["float" "keepaspectratio" "move ${pip.x} ${pip.y}" "noinitialfocus" "pin" "size ${pip.w} ${pip.h}" "plugin:hyprbars:nobar"])
(t.social ["plugin:scroller:group social" "plugin:scroller:columnwidth onequarter" "plugin:scroller:windowheight onehalf"])
(t.social ["plugin:scroller:group social" "plugin:scroller:columnwidth onefourth" "plugin:scroller:windowheight onehalf"])
(t.steam ["suppressevent activate activatefocus" "workspace special:steam silent" "plugin:hyprbars:nobar"])
(t.terminal ["plugin:scroller:group terminal"])
(t.vault ["workspace special:vault silent" "plugin:hyprbars:nobar" "plugin:scroller:group vault"])
(t.vm ["workspace special:vm silent" "plugin:scroller:group vm"])
### Overrides

View file

@ -17,19 +17,18 @@ in {
# https://wiki.hyprland.org/Configuring/Animations/
#?? animation = NAME, ONOFF, SPEED, CURVE, STYLE
animation = [
"global, 1, 3, easeOutCubic"
"specialWorkspace, 1, 3, easeOutCubic, fade"
"windows, 1, 3, easeOutCubic, slide"
"workspaces, 1, 3, easeOutCubic, slidevert"
"global, 1, 4, default"
"windows, 1, 4, custom, popin 25%"
"layers, 1, 4, custom, popin 25%"
"workspaces, 1, 4, custom, slidevert"
"specialWorkspace, 1, 4, custom, slidefadevert 25%"
];
# https://wiki.hyprland.org/Configuring/Animations/#curves
# https://easings.net/
#?? bezier = NAME, X0, Y0, X1, Y1
bezier = [
"easeInOutCubic, 0.65, 0, 0.35, 1"
"easeOutCubic, 0.33, 1, 0.68, 1"
"easeOutSine, 0.61, 1, 0.88, 1"
"custom, 0.5, 1.25, 0.5, 1"
];
# https://wiki.hyprland.org/Configuring/Variables/#binds

View file

@ -26,11 +26,11 @@ in {
config = mkIf cfg.enable {
custom = mkIf (config.custom.menu == "rofi") {
menus = mapAttrsRecursive (path: value: pkgs.writeShellScript (concatStringsSep "-" (["menus"] ++ path)) value) {
default.show = "${pkill} --exact rofi || ${rofi} -show drun -show-icons";
calculator.show = ''${pkill} --exact rofi || ${rofi} -show calc -no-history -calc-error-color '#dc322f' -calc-command "${echo} -n '{result}' | ${wl-copy}"'';
default.show = "${pkill} --exact rofi || ${rofi} -modes drun -show drun -show-icons";
calculator.show = ''${pkill} --exact rofi || ${rofi} -modes calc -show calc -no-history -calc-error-color '#dc322f' -calc-command "${echo} -n '{result}' | ${wl-copy}"'';
clipboard = {
show = "${pkill} --exact rofi || ${rofi} -show clipboard -show-icons";
show = "${pkill} --exact rofi || ${rofi} -modes clipboard -show clipboard -show-icons";
clear = "${cliphist} wipe && ${notify-send} '> cliphist' 'Clipboard cleared' --urgency low";
clear-silent = "${cliphist} wipe";
};
@ -39,7 +39,7 @@ in {
emoji.show = "${pkill} --exact rofi || ${rofimoji} --prompt 󰱰";
network.show = "${pkill} --exact rofi || ${networkmanager_dmenu}";
search.show = "";
vault.show = "${pkill} --exact rofi || ${rofi-rbw} --prompt 󰌾";
vault.show = "${pkill} --exact rofi || ${rofi-rbw}";
};
services = {
@ -87,17 +87,6 @@ in {
drun-display-format = "{name}"; # Display only names
drun-match-fields = "name"; # Disable matching of invisible desktop attributes
matching = "prefix"; # Match beginning of words
# https://davatorium.github.io/rofi/current/rofi.1/#available-modes
modes = [
"calc"
"clipboard"
"combi"
"drun"
"keys"
"run"
"ssh"
];
};
};

View file

@ -1,6 +1,7 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
@ -8,7 +9,7 @@ with lib; let
in {
options.custom.programs.chromium = {
enable = mkOption {default = false;};
package = mkOption {default = config.custom.browser.package;};
package = mkOption {default = pkgs.brave;};
};
config = mkIf cfg.enable {

View file

@ -33,15 +33,17 @@ with lib; {
appimage.enable = true;
chromium.enable = true;
dconf.enable = true;
firefox.enable = true;
#// firefox.enable = true;
#// foot.enable = true;
gamescope.enable = true;
#// gnome-terminal.enable = true;
#// kdeconnect.enable = true;
kitty.enable = true;
librewolf.enable = true;
nautilus.enable = true;
nvtop.enable = true;
wezterm.enable = true;
zen-browser.enable = true;
})
(mkIf config.custom.full {
@ -59,7 +61,6 @@ with lib; {
#// gtklock.enable = true;
hyprlock.enable = true;
libreoffice.enable = true;
#// librewolf.enable = true;
localsend.enable = true;
logseq.enable = true;
mangohud.enable = true;

View file

@ -1,617 +0,0 @@
{
config,
inputs,
lib,
pkgs,
...
}:
with lib; let
cfg = config.custom.programs.firefox;
in {
options.custom.programs.firefox.enable = mkOption {default = false;};
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# TODO: Switch to librewolf when supported by module
# https://github.com/nix-community/home-manager/pull/5128
#!! Creates package derivation
#?? config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage
# https://www.mozilla.org/en-US/firefox/developer
programs.firefox = {
enable = true;
package = pkgs.firefox-esr-128;
# nativeMessagingHosts = with pkgs; [
# firefoxpwa
# gnome-browser-connector
# ];
#!! Prefer policy over profile
#?? about:profiles
profiles.default = {
# Import CSS theme with solarized overrides
# https://github.com/rafaelmardojai/firefox-gnome-theme/blob/master/theme/colors/dark.css
userChrome = ''
@import "firefox-gnome-theme/userChrome.css";
:root {
--gnome-accent: #6c71c4;
--gnome-window-background: #002b36;
--gnome-window-color: #93a1a1;
--gnome-view-background: #073642;
--gnome-sidebar-background: #002b36;
--gnome-secondary-sidebar-background: #002b36;
--gnome-menu-background: #073642;
--gnome-headerbar-background: #002b36;
--gnome-toolbar-icon-fill: #93a1a1;
--gnome-tabbar-tab-hover-background: #073642;
--gnome-tabbar-tab-active-background: #073642;
--gnome-tabbar-tab-active-hover-background: #073642;
}
:root:-moz-window-inactive {
--gnome-inactive-entry-color: #586e75;
--gnome-tabbar-tab-hover-background: #073642;
--gnome-tabbar-tab-active-background: #073642;
}
/* Center bookmarks */
#PlacesToolbarItems {
justify-content: center;
}
/* Disable bookmark folder icons */
.bookmark-item[container] > .toolbarbutton-icon {
display: none;
}
'';
userContent = ''@import "firefox-gnome-theme/userContent.css";'';
settings = {
# https://github.com/rafaelmardojai/firefox-gnome-theme?tab=readme-ov-file#features
"gnomeTheme.bookmarksToolbarUnderTabs" = true;
#// "gnomeTheme.systemIcons" = true;
"font.default.x-unicode" = config.custom.settings.fonts.sans-serif;
"font.default.x-western" = config.custom.settings.fonts.sans-serif;
"font.name-list.emoji" = config.custom.settings.fonts.emoji; # System emoji
"font.name.monospace.x-unicode" = config.custom.settings.fonts.monospace;
"font.name.monospace.x-western" = config.custom.settings.fonts.monospace;
"font.name.sans-serif.x-unicode" = config.custom.settings.fonts.sans-serif;
"font.name.sans-serif.x-western" = config.custom.settings.fonts.sans-serif;
"font.name.serif.x-unicode" = config.custom.settings.fonts.sans-serif;
"font.name.serif.x-western" = config.custom.settings.fonts.sans-serif;
"full-screen-api.ignore-widgets" = false; # Fake fullscreen
"full-screen-api.warning.delay" = -1;
"full-screen-api.warning.timeout" = 0;
"middlemouse.paste" = false;
"privacy.donottrackheader.enabled" = true;
"privacy.fingerprintingProtection" = false;
"privacy.globalprivacycontrol.enabled" = true;
"svg.context-properties.content.enabled" = true; # Dark theme icons
};
};
# https://mozilla.github.io/policy-templates
policies = {
CaptivePortal = false;
DisableFirefoxStudies = true;
DisableFormHistory = true;
DisableMasterPasswordCreation = true;
DisablePocket = true;
DisableSetDesktopBackground = true;
DisableTelemetry = true;
DNSOverHTTPS = {
Enabled = false;
Locked = true;
};
DontCheckDefaultBrowser = true;
# https://mozilla.github.io/policy-templates/#extensionsettings
#?? https://addons.mozilla.org/en-US/firefox
#?? about:support#addons
ExtensionSettings = let
extension = id: {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${id}/latest.xpi";
installation_mode = "normal_installed";
};
in
mkMerge [
(mkIf config.custom.minimal {
"uBlock0@raymondhill.net" = extension "ublock-origin"; # uBlock Origin
})
(mkIf config.custom.full {
"{d634138d-c276-4fc8-924b-40a0ea21d284}" = extension "1password-x-password-manager"; # 1Password: Password Manager
#// "firefox@betterttv.net" = extension "betterttv"; # BetterTTV
#// "{446900e4-71c2-419f-a6a7-df9c091e268b}" = extension "bitwarden-password-manager"; # Bitwarden
#// "FirefoxColor@mozilla.com" = extension "firefox-color"; # Firefox Color
#// "chrome-gnome-shell@gnome.org" = extension "gnome-shell-integration"; # GNOME Shell Integration
#// "{248e6a49-f636-4c81-9899-a456eb6291a8}" = extension "ground-news-bias-checker"; # Ground News Bias Checker
#// "{3c6bf0cc-3ae2-42fb-9993-0d33104fdcaf}" = extension "youtube-addon"; # ImprovedTube
#// "7esoorv3@alefvanoon.anonaddy.me" = extension "libredirect"; # LibRedirect
#// "firefoxpwa@filips.si" = extension "pwas-for-firefox"; # Progressive Web Apps for Firefox
"select-after-closing-current@qw.linux-2g64.local" = extension "select-after-closing-current"; # Select After Closing Current
"myallychou@gmail.com" = extension "youtube-recommended-videos"; # Unhook: Remove YouTube Recommended Videos Comments
"simple-tab-groups@drive4ik" = extension "simple-tab-groups"; # Simple Tab Groups
"sponsorBlocker@ajay.app" = extension "sponsorblock"; # SponsorBlock
"{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}" = extension "styl-us"; # Stylus
#// "{a0370179-acc3-452f-9530-246b6adb2768}" = extension "svelte-devtools"; # Svelte Devtools
"uBlock0@raymondhill.net" = extension "ublock-origin"; # uBlock Origin
#// "{2662ff67-b302-4363-95f3-b050218bd72c}" = extension "untrap-for-youtube"; # UnTrap for YouTube
#// "{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" = extension "user-agent-string-switcher"; # User-Agent Switcher and Manager
#// "{c49b13b1-5dee-4345-925e-0c793377e3fa}" = extension "youtube-enhancer-vc"; # YouTube Enhancer
})
];
FirefoxHome = {
Highlights = false;
Pocket = false;
Search = false;
Snippets = false;
SponsoredPocket = false;
SponsoredTopSites = false;
TopSites = false;
Locked = true;
};
FirefoxSuggest = {
ImproveSuggest = false;
SponsoredSuggestions = false;
WebSuggestions = false;
Locked = true;
};
HardwareAcceleration = true;
Homepage = {
StartPage = "previous-session";
Locked = true;
};
NetworkPrediction = false;
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
OverrideFirstRunPage = "";
PasswordManagerEnabled = false;
Permissions = {
Autoplay.Default = "block-audio-video";
Location.BlockNewRequests = true;
};
PictureInPicture = {
Enabled = true;
Locked = true;
};
PopupBlocking.Default = true;
#!! Only certain preferences are supported via policies
# https://mozilla.github.io/policy-templates/#preferences
#?? about:config
Preferences = let
locked = value: {
Value = value;
Status = "locked";
};
in {
"accessibility.browsewithcaret" = locked false;
"accessibility.typeaheadfind" = locked false;
"browser.aboutConfig.showWarning" = locked false;
"browser.contentblocking.category" = locked "standard";
"browser.crashReports.unsubmittedCheck.autoSubmit2" = locked false;
"browser.ctrlTab.sortByRecentlyUsed" = locked false;
"browser.download.always_ask_before_handling_new_types" = locked false;
"browser.download.useDownloadDir" = locked true;
"browser.link.open_newwindow" = locked 3; # New tab
"browser.link.open_newwindow.restriction" = locked 0; # Popups in new tab
"browser.newtabpage.enabled" = locked true;
"browser.preferences.defaultPerformanceSettings.enabled" = locked true;
"browser.quitShortcut.disabled" = locked true;
"browser.search.widget.inNavBar" = locked false;
"browser.startup.homepage" = locked "about:home";
"browser.startup.page" = locked 3; # Previous session
"browser.tabs.allowTabDetach" = locked false;
"browser.tabs.closeTabByDblclick" = locked true;
"browser.tabs.closeWindowWithLastTab" = locked false;
"browser.tabs.insertAfterCurrent" = locked false;
"browser.tabs.insertRelatedAfterCurrent" = locked false;
"browser.tabs.loadInBackground" = locked true;
"browser.tabs.warnOnClose" = locked false;
"browser.tabs.warnOnCloseOtherTabs" = locked false;
"browser.theme.dark-private-windows" = locked false;
"browser.toolbars.bookmarks.showOtherBookmarks" = locked false;
"browser.uidensity" = locked 0;
"browser.warnOnQuitShortcut" = locked true;
"dom.security.https_only_mode" = locked true;
"extensions.formautofill.addresses.enabled" = locked false;
"extensions.formautofill.creditCards.enabled" = locked false;
"general.autoScroll" = locked false;
"general.smoothScroll" = locked true;
"gfx.webrender.software" = locked config.custom.programs.looking-glass.igpu; # Reduce load on iGPU
"layers.acceleration.force-enabled" = locked true;
"layout.css.always_underline_links" = locked false;
"layout.css.backdrop-filter.enabled" = locked true;
"layout.spellcheckDefault" = locked 0; # Disabled
"media.eme.enabled" = locked true; # DRM
"media.ffmpeg.vaapi.enabled" = locked true;
"media.hardwaremediakeys.enabled" = locked true;
"media.hardware-video-decoding.enabled" = locked true;
#// "media.rdd-process.enabled" = locked false; # RDD sandbox #!! Insecure
"toolkit.legacyUserProfileCustomizations.stylesheets" = locked true;
"ui.key.menuAccessKey" = locked 0; # Disable menu key
"widget.gtk.overlay-scrollbars.enabled" = locked true;
"widget.gtk.rounded-bottom-corners.enabled" = locked true;
};
SearchBar = "unified";
# https://mozilla.github.io/policy-templates/#searchengines-this-policy-is-only-available-on-the-esr
SearchEngines = {
Default = "Kagi";
Add = [
{
Name = "Amazon";
Alias = "a";
IconURL = "https://www.amazon.com/favicon.ico";
URLTemplate = "https://www.amazon.com/s?k={searchTerms}";
}
{
Name = "ArchWiki";
Alias = "aw";
IconURL = "https://wiki.archlinux.org/favicon.ico";
URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}";
}
{
Name = "Brave";
Alias = "b";
IconURL = "https://cdn.search.brave.com/serp/v2/_app/immutable/assets/favicon.c09fe1a1.ico";
URLTemplate = "https://search.brave.com/search?q={searchTerms}";
}
{
Name = "Duck";
Alias = "d";
IconURL = "https://duckduckgo.com/favicon.ico";
URLTemplate = "https://duckduckgo.com/?q={searchTerms}";
SuggestURLTemplate = "https://duckduckgo.com/ac/?type=list&q={searchTerms}";
}
{
Name = "Docker Hub";
Alias = "dh";
IconURL = "https://hub.docker.com/favicon.ico";
URLTemplate = "https://hub.docker.com/search?q={searchTerms}";
}
{
Name = "e621";
Alias = "e";
IconURL = "https://e621.net/favicon.ico";
URLTemplate = "https://e621.net/posts?tags={searchTerms}";
}
{
Name = "Element Issues";
Alias = "ei";
IconURL = "https://github.com/favicon.ico";
URLTemplate = "https://github.com/element-hq/element-web/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";
}
{
Name = "Flathub";
Alias = "fh";
IconURL = "https://flathub.org/favicon.png";
URLTemplate = "https://flathub.org/apps/search?q={searchTerms}";
}
{
Name = "Google";
Alias = "g";
IconURL = "https://www.google.com/favicon.ico";
URLTemplate = "https://www.google.com/search?q={searchTerms}";
}
{
Name = "Google Fonts";
Alias = "gf";
IconURL = "https://www.gstatic.com/images/icons/material/apps/fonts/1x/catalog/v5/favicon.svg";
URLTemplate = "https://fonts.google.com/?query={searchTerms}";
}
{
Name = "GitHub";
Alias = "gh";
IconURL = "https://github.com/favicon.ico";
URLTemplate = "https://github.com/search?q={searchTerms}";
}
{
Name = "Home Manager Issues";
Alias = "hi";
IconURL = "https://github.com/favicon.ico";
URLTemplate = "https://github.com/nix-community/home-manager/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";
}
{
Name = "Home Manager Options";
Alias = "ho";
IconURL = "https://home-manager-options.extranix.com/images/favicon.png";
URLTemplate = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master";
}
{
Name = "Hyprland Issues";
Alias = "hyi";
IconURL = "https://github.com/favicon.ico";
URLTemplate = "https://github.com/hyprwm/Hyprland/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";
}
{
Name = "i3 Issues";
Alias = "ii";
IconURL = "https://github.com/favicon.ico";
URLTemplate = "https://github.com/i3/i3/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";
}
{
Name = "Kagi";
Alias = "k";
IconURL = "https://kagi.com/asset/v2/favicon-32x32.png";
URLTemplate = "https://kagi.com/search?q={searchTerms}";
SuggestURLTemplate = "https://kagi.com/api/autosuggest?q={searchTerms}";
}
{
Name = "Lutris";
Alias = "l";
IconURL = "https://lutris.net/favicon.ico";
URLTemplate = "https://lutris.net/games?q={searchTerms}";
}
{
Name = "Lix Issues";
Alias = "li";
IconURL = "https://git.lix.systems/assets/img/favicon.png";
URLTemplate = "https://git.lix.systems/lix-project/lix/issues?state=open&q={searchTerms}";
}
{
Name = "Mozilla Web Docs";
Alias = "mdn";
IconURL = "https://developer.mozilla.org/favicon-48x48.cbbd161b.png";
URLTemplate = "https://developer.mozilla.org/en-US/search?q={searchTerms}";
}
{
Name = "MyNixOS Options";
Alias = "mno";
IconURL = "https://mynixos.com/favicon.ico";
URLTemplate = "https://mynixos.com/search?q=option+{searchTerms}";
}
{
Name = "Nix Dev";
Alias = "nd";
IconURL = "https://nix.dev/manual/nix/latest/favicon.png";
URLTemplate = "https://nix.dev/manual/nix/latest?search={searchTerms}";
}
{
Name = "NixOS Flakes";
Alias = "nf";
IconURL = "https://nixos.org/favicon.png";
URLTemplate = "https://search.nixos.org/flakes?channel=unstable&query={searchTerms}";
}
{
Name = "Nix Hub";
Alias = "nh";
IconURL = "https://www.nixhub.io/favicon.ico";
URLTemplate = "https://www.nixhub.io/search?q={searchTerms}";
}
{
Name = "NixOS Nixpkgs Issues";
Alias = "ni";
IconURL = "https://github.com/favicon.ico";
URLTemplate = "https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";
}
{
Name = "Nix PR";
Alias = "npr";
URLTemplate = "https://nixpk.gs/pr-tracker.html?pr={searchTerms}";
}
{
Name = "NixOS Options";
Alias = "no";
IconURL = "https://nixos.org/favicon.png";
URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
}
{
Name = "Noogle Dev";
Alias = "nod";
IconURL = "https://noogle.dev/favicon.png";
URLTemplate = "https://noogle.dev/q?term={searchTerms}";
}
{
Name = "NixOS Packages";
Alias = "np";
IconURL = "https://nixos.org/favicon.png";
URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
}
{
Name = "Niri Issues";
Alias = "nri";
IconURL = "https://github.com/favicon.ico";
URLTemplate = "https://github.com/YaLTeR/niri/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";
}
{
Name = "NixOS Wiki";
Alias = "nw";
IconURL = "https://wiki.nixos.org/favicon.ico";
URLTemplate = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
}
{
Name = "Piped";
Alias = "p";
IconURL = "https://piped.${config.custom.domain}/favicon.ico";
URLTemplate = "https://piped.${config.custom.domain}/results?search_query={searchTerms}";
}
{
Name = "PCGamingWiki";
Alias = "pc";
IconURL = "https://static.pcgamingwiki.com/favicons/pcgamingwiki.png";
URLTemplate = "https://www.pcgamingwiki.com/w/index.php?search={searchTerms}";
}
{
Name = "ProtonDB";
Alias = "pdb";
IconURL = "https://www.protondb.com/sites/protondb/images/favicon.ico";
URLTemplate = "https://www.protondb.com/search?q={searchTerms}";
}
{
Name = "PyPI";
Alias = "pip";
IconURL = "https://pypi.org/static/images/favicon.35549fe8.ico";
URLTemplate = "https://pypi.org/search/?q={searchTerms}";
}
{
Name = "Reddit";
Alias = "r";
IconURL = "https://www.redditstatic.com/desktop2x/img/favicon/favicon-96x96.png";
URLTemplate = "https://kagi.com/search?q=site%3Areddit.com+{searchTerms}";
}
{
Name = "SearXNG";
Alias = "s";
IconURL = "https://search.${config.custom.domain}/static/themes/simple/img/favicon.png";
URLTemplate = "https://search.${config.custom.domain}/search?q={searchTerms}";
}
{
Name = "Sway Issues";
Alias = "si";
IconURL = "https://github.com/favicon.ico";
URLTemplate = "https://github.com/swaywm/sway/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";
}
{
Name = "Wikipedia";
Alias = "w";
IconURL = "https://en.wikipedia.org/static/favicon/wikipedia.ico";
URLTemplate = "https://en.wikipedia.org/w/index.php?search={searchTerms}";
}
{
Name = "Wolfram Alpha";
Alias = "wa";
IconURL = "https://www.wolframalpha.com/_next/static/images/favicon_1zbE9hjk.ico";
URLTemplate = "https://www.wolframalpha.com/input?i={searchTerms}";
}
{
Name = "Walker Issues";
Alias = "wi";
IconURL = "https://github.com/favicon.ico";
URLTemplate = "https://github.com/abenz1267/walker/issues?q=is%3Aissue+is%3Aopen+{searchTerms}";
}
{
Name = "YouTube";
Alias = "y";
IconURL = "https://www.youtube.com/s/desktop/f8c8418d/img/favicon.ico";
URLTemplate = "https://www.youtube.com/results?search_query={searchTerms}";
}
];
Remove = [
"Amazon.com"
"Bing"
"DuckDuckGo"
"eBay"
"Google"
"Wikipedia (en)"
];
};
SearchSuggestEnabled = true;
ShowHomeButton = true;
UserMessaging = {
ExtensionRecommendations = false;
FeatureRecommendations = false;
MoreFromMozilla = false;
SkipOnboarding = false;
UrlbarInterventions = false;
WhatsNew = false;
Locked = true;
};
};
};
home.file = {
# TODO: Consider other themes
# https://github.com/soulhotel/FF-ULTIMA
# CSS theme to import into profile
# https://github.com/rafaelmardojai/firefox-gnome-theme
".mozilla/firefox/default/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme;
# Imperative symlinks intended to be synced
"Downloads/stg" = mkIf config.custom.full {
source = config.home-manager.users.${config.custom.username}.lib.file.mkOutOfStoreSymlink "${config.custom.sync}/common/config/extensions/Simple Tab Groups";
};
# Work around icon dissociation due to missing --name flag in actions
# https://github.com/micheleg/dash-to-dock/issues/1968
#!! Keep updated with upstream desktop file
#?? cat /etc/profiles/per-user/myned/share/applications/firefox-esr.desktop
# ".local/share/applications/firefox-esr.desktop".text = ''
# [Desktop Entry]
# Actions=new-private-window;new-window;profile-manager-window
# Categories=Network;WebBrowser
# Exec=firefox --name firefox %U
# GenericName=Web Browser
# Icon=firefox
# MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;x-scheme-handler/http;x-scheme-handler/https
# Name=Firefox ESR
# StartupNotify=true
# StartupWMClass=firefox
# Terminal=false
# Type=Application
# Version=1.4
# [Desktop Action new-private-window]
# Exec=firefox --name firefox --private-window %U
# Name=New Private Window
# [Desktop Action new-window]
# Exec=firefox --name firefox --new-window %U
# Name=New Window
# [Desktop Action profile-manager-window]
# Exec=firefox --name firefox --ProfileManager
# Name=Profile Manager
# '';
};
};
}

View file

@ -0,0 +1,35 @@
{
config,
inputs,
lib,
pkgs,
...
}:
with lib; let
cfg = config.custom.programs.firefox;
in {
options.custom.programs.firefox = {
enable = mkOption {default = false;};
};
config = mkIf cfg.enable {
home-manager.sharedModules = [
{
# https://www.mozilla.org/en-US/firefox/developer
programs.firefox = mkMerge [
(import "${inputs.self}/modules/firefox.nix" {inherit config inputs lib pkgs;})
{
enable = true;
}
];
home.file = {
".mozilla/profiles.ini" = {
force = true;
};
};
}
];
};
}

View file

@ -0,0 +1,36 @@
{
config,
inputs,
lib,
pkgs,
...
}:
with lib; let
cfg = config.custom.programs.librewolf;
in {
options.custom.programs.librewolf = {
enable = mkOption {default = false;};
};
config = mkIf cfg.enable {
home-manager.sharedModules = [
{
# https://librewolf.net/
# https://codeberg.org/librewolf
programs.librewolf = mkMerge [
(import "${inputs.self}/modules/firefox.nix" {inherit config inputs lib pkgs;})
{
enable = true;
}
];
home.file = {
".librewolf/profiles.ini" = {
force = true;
};
};
}
];
};
}

View file

@ -0,0 +1,72 @@
{
config,
inputs,
lib,
pkgs,
...
}:
with lib; let
cfg = config.custom.programs.zen-browser;
in {
options.custom.programs.zen-browser = {
enable = mkOption {default = false;};
};
config = mkIf cfg.enable {
home-manager.sharedModules = [
{
# https://zen-browser.app/
# https://github.com/youwen5/zen-browser-flake
programs.zen-browser = mkMerge [
(import "${inputs.self}/modules/firefox.nix" {
inherit config inputs lib pkgs;
# TODO: Revisit Zen themes
theme = false;
})
{
enable = true;
profiles.default.settings = {
"zen.pinned-tab-manager.close-shortcut-behavior" = "reset-unload-switch";
"zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url" = true;
"zen.tab-unloader.timeout-minutes" = 60;
"zen.theme.accent-color" = "#d33682";
"zen.theme.color-prefs.colorful" = false;
"zen.theme.color-prefs.use-workspace-colors" = true;
"zen.theme.pill-button" = true;
"zen.urlbar.replace-newtab" = false;
"zen.view.compact.hide-toolbar" = true;
"zen.view.sidebar-expanded" = false;
"zen.view.use-single-toolbar" = false;
"zen.welcome-screen.seen" = true;
"zen.workspaces.container-specific-essentials-enabled" = true;
"zen.workspaces.force-container-workspace" = true;
"zen.workspaces.hide-deactivated-workspaces" = true;
"zen.workspaces.individual-pinned-tabs" = false;
"zen.workspaces.show-icon-strip" = false;
};
}
];
home = {
activation = {
# HACK: Zen only recognizes profiles that include the ZenAvatarPath key
update-zen-browser-profile = lib.home-manager.hm.dag.entryAfter ["writeBoundary"] ''
run sed -i \
's|\[Profile\([0-9]*\)\]|[Profile\1]\nZenAvatarPath=chrome://browser/content/zen-avatars/avatar-95.svg|' \
"$HOME/.zen/profiles.ini"
'';
};
file = {
".zen/profiles.ini" = {
force = true;
};
};
};
}
];
};
}

View file

@ -1,17 +0,0 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.custom.programs.librewolf;
in {
options.custom.programs.librewolf.enable = mkOption {default = false;};
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://codeberg.org/librewolf
# TODO: Revisit when extensions can be managed declaratively
# https://github.com/nix-community/home-manager/issues/2803
programs.librewolf.enable = true;
};
}

View file

@ -36,10 +36,26 @@ in {
# https://github.com/NixOS/nixpkgs/pull/303745
# https://github.com/fdw/rofi-rbw?tab=readme-ov-file#configuration
xdg.configFile = {
"rofi-rbw.rc".text = ''
"rofi-rbw.rc".text = let
keybindings = concatStringsSep "," [
"Ctrl+1:print:username"
"Ctrl+2:print:password"
"Ctrl+3:print:totp"
"Alt+1:type:delay:username"
"Alt+2:type:delay:password"
"Alt+3:type:delay:totp"
"Alt+u:copy:username"
"Alt+p:copy:password"
"Alt+t:copy:totp"
"Alt+s:sync"
];
in ''
action=copy
keybindings=${keybindings}
no-help=true
prompt=󰌾
selector=${config.custom.menu}
target=menu
'';
};
}

View file

@ -127,6 +127,7 @@ in {
# GNOME Text Editor
"org/gnome/TextEditor" = {
custom-font = mkString "monospace 14";
highlight-current-line = mkBoolean true;
restore-session = mkBoolean false;
show-line-numbers = mkBoolean true;

View file

@ -47,6 +47,7 @@ in {
xorg.xev # X11 keysym tester
### Dependencies
lz4 # Compression algorithm
man-pages
man-pages-posix
]