{ config, lib, pkgs, ... }: with lib; let cfg = config.nixfiles.modules.profiles.headful; in { config = mkIf cfg.enable { nixfiles.modules = { chromium.enable = true; firefox.enable = true; sound.enable = true; nullmailer.enable = true; dwm.enable = mkDefault false; kde.enable = mkDefault true; xmonad.enable = mkDefault false; }; hm = { home.packages = with pkgs; [ calibre element-desktop imv mumble telegram-desktop tor-browser-bundle-bin ]; programs = { bash.shellAliases.open = "xdg-open"; thunderbird = { enable = true; profiles.default = { isDefault = true; withExternalGnupg = true; }; settings = { "app.update.auto" = false; "browser.display.document_color_use" = 2; "browser.display.use_system_colors" = true; "browser.search.region" = "US"; "browser.search.update" = false; "datareporting.healthreport.uploadEnabled" = false; "full-screen-api.warning.delay" = 0; "full-screen-api.warning.timeout" = 0; "general.autoScroll" = true; "general.smoothScroll" = true; "mail.default_send_format" = 0; "mail.tabs.drawInTitlebar" = if config.nixfiles.modules.kde.enable then 1 else 0; "mailnews.start_page.url" = "about:blank"; "media.autoplay.blocking_policy" = 2; "media.autoplay.default" = 5; "media.autoplay.enabled" = false; "media.hardwaremediakeys.enabled" = false; "network.cookie.cookieBehavior" = 2; "places.history.enabled" = false; "reader.parse-on-load.enabled" = false; "toolkit.legacyUserProfileCustomizations.stylesheets" = true; }; }; }; }; boot = { kernelPackages = mkDefault pkgs.linuxPackages_latest; kernelParams = [ # https://wiki.archlinux.org/title/improving_performance#Watchdogs "nowatchdog" "kernel.nmi_watchdog=0" # A security risk I'm willing to take for a reason[1]. # # [1]: https://www.phoronix.com/scan.php?page=article&item=spectre-meltdown-2&num=11 "mitigations=off" ]; loader = { efi.canTouchEfiVariables = true; systemd-boot = { enable = true; configurationLimit = 10; }; }; }; hardware.opengl = { enable = true; driSupport = true; }; programs = { dconf.enable = true; iftop.enable = true; mtr.enable = true; }; services = { # https://github.com/NixOS/nixpkgs/issues/135888 upower.enable = true; psd.enable = true; }; environment.systemPackages = with pkgs; [lm_sensors]; my.extraGroups = [ "audio" "input" "render" "video" ]; }; }