2023-11-23 01:21:58 -08:00
|
|
|
{ config, lib, pkgs, user, ... }:
|
2023-11-19 11:29:30 -08:00
|
|
|
|
|
|
|
let cfg = config.modules.desktop.browser;
|
|
|
|
|
|
|
|
in {
|
|
|
|
options.modules.desktop.browser.enable = lib.mkEnableOption "browser";
|
|
|
|
config = lib.mkIf cfg.enable {
|
2023-11-23 01:21:58 -08:00
|
|
|
environment.systemPackages = with pkgs; [
|
2024-04-21 10:37:47 -07:00
|
|
|
google-chrome # Web browser developed by Google.
|
2023-11-19 11:29:30 -08:00
|
|
|
];
|
|
|
|
programs.chromium = {
|
|
|
|
enable = true;
|
|
|
|
extraOpts = {
|
2023-11-22 00:56:06 -08:00
|
|
|
|
|
|
|
# Disable all manner of account-related things.
|
|
|
|
"BrowserSignin" = 0; # disable
|
|
|
|
"BrowserAddPersonEnabled" = false;
|
|
|
|
"BrowserGuestModeEnabled" = false;
|
|
|
|
"UserDisplayName" = "PolicyUser";
|
|
|
|
"UserFeedbackAllowed" = false;
|
|
|
|
"BackgroundModeEnabled" = false;
|
|
|
|
"MetricsReportingEnabled" = false;
|
|
|
|
"BlockExternalExtensions" = true;
|
|
|
|
"AutofillAddressEnabled" = false;
|
|
|
|
"AutofillCreditCardEnabled" = false;
|
2023-11-19 11:29:30 -08:00
|
|
|
"PasswordManagerEnabled" = false;
|
2023-11-22 00:56:06 -08:00
|
|
|
"PromptForDownloadLocation" = true;
|
|
|
|
"SyncDisabled" = true;
|
2023-11-19 11:29:30 -08:00
|
|
|
"SpellcheckEnabled" = true;
|
|
|
|
"SpellcheckLanguage" = [ "en-US" ];
|
|
|
|
"CloudPrintSubmitEnabled" = false;
|
|
|
|
"EnableMediaRouter" = false;
|
|
|
|
"ShowCastIconInToolbar" = false;
|
2023-11-22 00:56:06 -08:00
|
|
|
|
|
|
|
# Install extensions
|
2023-11-19 11:29:30 -08:00
|
|
|
"ExtensionInstallForcelist" = [
|
2023-12-14 00:12:57 -08:00
|
|
|
"ihennfdbghdiflogeancnalflhgmanop" # Gruvbox theme
|
2023-11-19 11:29:30 -08:00
|
|
|
"fkeaekngjflipcockcnpobkpbbfbhmdn" # Copy as Markdown
|
2024-01-07 09:44:23 -08:00
|
|
|
"pcmpcfapbekmbjjkdalcgopdkipoggdi" # MarkDownload
|
2023-11-19 11:29:30 -08:00
|
|
|
"nngceckbapebfimnlniiiahkandclblb" # Bitwarden
|
2023-11-22 00:56:06 -08:00
|
|
|
"icpgjfneehieebagbmdbhnlpiopdcmna" # New Tab Redirect
|
2023-11-22 23:54:46 -08:00
|
|
|
"oahiolknhkbpcolgnpljehalnhblolkm" # Shorts Blocker
|
2023-11-25 01:47:52 -08:00
|
|
|
"hkgfoiooedgoejojocmhlaklaeopbecg" # Picture-in-Picture (by Google)
|
2023-12-01 22:57:59 -08:00
|
|
|
"dbepggeogbaibhgnhhndojpepiihcmeb" # Vimium
|
2023-11-22 00:56:06 -08:00
|
|
|
];
|
|
|
|
|
|
|
|
# Setup bookmarks
|
2023-11-24 16:56:51 -08:00
|
|
|
"BookmarkBarEnabled" = true;
|
2023-11-22 00:56:06 -08:00
|
|
|
"ShowAppsShortcutInBookmarkBar" = false;
|
|
|
|
"ManagedBookmarks" = [
|
|
|
|
{ "toplevel_name" = "Bookmarks"; }
|
|
|
|
{ "name" = "Daily"; "children" = [
|
2024-08-02 23:38:57 -07:00
|
|
|
{ "url" = "https://lc.tstarr.us"; name = "Chisme Mattermost"; }
|
2023-12-03 12:26:23 -08:00
|
|
|
{ "url" = "https://rss.tstarr.us"; name = "Miniflux"; }
|
2024-05-21 23:31:11 -07:00
|
|
|
{ "url" = "https://cloud.tstarr.us"; name = "Nextcloud"; }
|
2024-01-01 00:19:58 -08:00
|
|
|
{ "url" = "https://git.tstarr.us"; name = "Gitea"; }
|
2023-12-03 12:26:23 -08:00
|
|
|
{ "url" = "https://media.tstarr.us/web/index.html#!/home.html"; name = "Jellyfin"; }
|
|
|
|
{ "url" = "https://home.tstarr.us"; name = "Home Assistant"; }
|
2023-11-22 00:56:06 -08:00
|
|
|
{ "url" = "https://www.youtube.com/feed/subscriptions"; name = "Youtube"; }
|
|
|
|
{ "url" = "https://gmail.com/"; name = "Mail"; }
|
|
|
|
{ "url" = "https://github.com/"; name = "GitHub"; }
|
2023-11-22 09:29:33 -08:00
|
|
|
{ "url" = "https://www.google.com/"; name = "Google"; }
|
|
|
|
{ "url" = "https://www.icloud.com/"; name = "iCloud"; }
|
|
|
|
]; }
|
|
|
|
{ "name" = "Games"; "children" = [
|
|
|
|
{ "url" = "https://www.protondb.com/"; name = "ProtonDB"; }
|
|
|
|
{ "url" = "https://vimm.net/"; name = "Vimm's Lair: Preserving the Classics"; }
|
|
|
|
]; }
|
|
|
|
{ "name" = "Homelab"; "children" = [
|
|
|
|
{ "url" = "http://localhost:8384"; name = "Syncthing"; }
|
|
|
|
{ "url" = "https://github.com/starr-dusT/dotfiles"; name = "Dotfiles"; }
|
|
|
|
{ "url" = "https://rssbridge.tstarr.us"; name = "RSSBridge"; }
|
2023-11-22 00:56:06 -08:00
|
|
|
]; }
|
|
|
|
{ "name" = "Nix"; "children" = [
|
|
|
|
{ "url" = "https://nixos.org/nix/manual/"; name = "nix-manual"; }
|
|
|
|
{ "url" = "https://nixos.org/nixpkgs/manual/"; name = "nixpkgs-manual"; }
|
|
|
|
{ "url" = "https://nixos.org/nixos/manual/"; name = "nixos-manual"; }
|
|
|
|
{ "url" = "https://nixos.org/nixos/options.html"; name = "nixos-options"; }
|
|
|
|
{ "url" = "https://discourse.nixos.org/"; name = "nixos-discourse"; }
|
|
|
|
{ "url" = "https://old.reddit.com/r/nixos/"; name = "nixos-reddit"; }
|
|
|
|
{ "url" = "https://nixos.wiki/"; name = "nixos-wiki"; }
|
|
|
|
]; }
|
2023-11-19 11:29:30 -08:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2023-12-01 23:12:21 -08:00
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 8080 ];
|
|
|
|
services.static-web-server = {
|
|
|
|
enable = true;
|
|
|
|
listen = "[::]:8080";
|
|
|
|
root = ../../../resources/blank;
|
|
|
|
};
|
2023-11-19 11:29:30 -08:00
|
|
|
};
|
|
|
|
}
|