diff options
author | Martin Fischer <martin@push-f.com> | 2024-12-27 08:45:34 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2024-12-27 18:44:37 +0100 |
commit | 1b65ba7a838e422c9bf16ddcaf796a996fa51b6b (patch) | |
tree | d8ec8d965f955a7f9a5c2b5c98e8a430fb0e8b6f /nixos/parts/graphical.nix | |
parent | edda7ef46bf2ae7fde9511005b4e7d40648c7e24 (diff) |
refactor: introduce profiles
Diffstat (limited to 'nixos/parts/graphical.nix')
-rw-r--r-- | nixos/parts/graphical.nix | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/nixos/parts/graphical.nix b/nixos/parts/graphical.nix deleted file mode 100644 index d459c33..0000000 --- a/nixos/parts/graphical.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ config, pkgs, ... }: - -{ - programs.sway = { - enable = true; - # Execute sway with required environment variables for GTK apps. - wrapperFeatures.gtk = true; - }; - programs.ssh.startAgent = true; - - environment.loginShellInit = '' - [[ "$(tty)" == /dev/tty1 ]] && exec sway - ''; - - environment.sessionVariables = { - # Tell .zshrc to source zshrc-graphical.sh. - MYNIX_GRAPHICAL = "true"; - }; - - environment.systemPackages = with pkgs; [ - swaylock - - # CLI tools - brightnessctl - wl-clipboard # for wl-copy and wl-paste - grim - - # When I ssh into a server my terminal changes to a host-specific background color via - # a LocalCommand configured in ~/.ssh/config and a ZSH function to reset the color on exit. - (writeShellScriptBin "set-bg" (builtins.readFile ./scripts/set-bg)) - (writeShellScriptBin "reset-bg" (builtins.readFile ./scripts/reset-bg)) - - # graphical tools - imv - mpv - - # set and forget - i3status-rust - ]; - - # This generates /etc/xdg/mimeapps.list. The XDG spec and xdg-open don't support wildcards in MIME types. - # TODO: use an xdg-open alternative that supports wildcards in MIME types and doesn't use mimeapps.list - xdg.mime.defaultApplications = - let - defaultBrowser = "firefox.desktop"; - in - { - "text/html" = defaultBrowser; - - "x-scheme-handler/http" = defaultBrowser; - "x-scheme-handler/https" = defaultBrowser; - "x-scheme-handler/mailto" = "thunderbird.desktop"; - }; - - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - security.rtkit.enable = true; # recommended for PipeWire - - programs.thunderbird = { - enable = true; - }; - - programs.firefox = { - enable = true; - - policies = { - DontCheckDefaultBrowser = true; - DisablePocket = true; - FirefoxHome = { - SponsoredTopSites = false; - }; - - SearchSuggestEnabled = false; - # cannot use SearchEngines because it's only available on ESR :( - # (https://mozilla.github.io/policy-templates/#searchengines-this-policy-is-only-available-on-the-esr) - - Preferences = { - "layout.css.devPixelsPerPx" = "1.2"; # with this the default Firefox font size matches my terminal font size of 14px - "browser.uidensity" = 1; - "browser.aboutConfig.showWarning" = false; - "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; # can be changed via UI despite this about:config setting being locked - }; - - ExtensionSettings = { - "uBlock0@raymondhill.net" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; - installation_mode = "force_installed"; - }; - }; - - PasswordManagerEnabled = false; - AutofillCreditCardEnabled = false; - ExtensionSettings."{446900e4-71c2-419f-a6a7-df9c091e268b}" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi"; - installation_mode = "force_installed"; - }; - }; - }; -} |