{config, lib, pkgs, inputs, ...}: { home.file.".mozilla/firefox/default/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme; programs.firefox.enable = true; programs.firefox.profiles.default = { userChrome = '' @import "firefox-gnome-theme/userChrome.css"; ''; userContent = '' @import "firefox-gnome-theme/userContent.css"; ''; settings = { # Firefox gnome theme ## - https://github.com/rafaelmardojai/firefox-gnome-theme/blob/7cba78f5216403c4d2babb278ff9cc58bcb3ea66/configuration/user.js # (copied into here because home-manager already writes to user.js) "toolkit.legacyUserProfileCustomizations.stylesheets" = true; # Enable customChrome.cs "browser.uidensity" = 0; # Set UI density to normal "svg.context-properties.content.enabled" = true; # Enable SVG context-propertes "browser.theme.dark-private-windows" = false; # Disable private window dark theme "extensions.autoDisableScopes" = 0; # Auto enable new extentions "browser.toolbars.bookmarks.visibility" = "never"; "gnomeTheme.hideSingleTab" = true; }; extensions = with inputs.firefox-addons.packages.${pkgs.system}; [ ublock-origin bitwarden consent-o-matic wayback-machine h264ify sponsorblock fediact tampermonkey multi-account-containers ]; search = { default = "DuckDuckGo"; force = true; }; containers = { "RYSST" = { color = "blue"; icon = "circle"; id = 1; }; "Lekker van Peet" = { color = "toolbar"; icon = "circle"; id = 2; }; }; containersForce = true; }; home.stateVersion = "22.05"; home.packages = [ pkgs.fortune ]; programs.home-manager.enable = true; programs.bash.enable = true; programs.bash.bashrcExtra = '' # Prompt if [ -n "$PS1" ]; then # A temporary variable to contain our prompt command NEW_PROMPT_COMMAND=' MY_PWD="$PWD" [[ "$MY_PWD" =~ ^"$HOME"(/|$) ]] && MY_PWD="~''${MY_PWD#$HOME}" TRIMMED_PWD=''${MY_PWD: -40}; TRIMMED_PWD=''${TRIMMED_PWD:-$MY_PWD} [[ "''${#MY_PWD}" -ge 41 ]] && TRIMMED_PWD="…$TRIMMED_PWD" SHELL_PREFIX="" [[ -n "$IN_NIX_SHELL" ]] && SHELL_PREFIX="$SHELL_PREFIX " [[ -n "$AWS_VAULT" ]] && SHELL_PREFIX="$SHELL_PREFIX 🔓︎" [[ -n "$FLUTTER_ENV" ]] && SHELL_PREFIX="$SHELL_PREFIX ✌︎" [[ -n "$REACTNATIVE_ENV" ]] && SHELL_PREFIX="$SHELL_PREFIX ⚛" ' # If there's an existing prompt command, let's not # clobber it if [ -n "''${PROMPT_COMMAND// /}" ]; then PROMPT_COMMAND="$PROMPT_COMMAND $NEW_PROMPT_COMMAND" else PROMPT_COMMAND="$NEW_PROMPT_COMMAND" fi # We're done with our temporary variable unset NEW_PROMPT_COMMAND # Set PS1 with our new variable # \h - hostname, \u - username # PS1='\u@\h:$TRIMMED_PWD\$ ' export PS1="[\t \[\e[32m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]]"'$SHELL_PREFIX'" \[\e[36m\]"'$TRIMMED_PWD'"\[\e[m\] \$ " fi eval "$(direnv hook bash)" export NIXPKGS_ALLOW_UNFREE=1 ''; programs.bash.shellAliases = { chmod = "chmod --preserve-root"; chown = "chown --preserve-root"; ls = "ls -Isnap --color"; df = "df -h -x squashfs -x tmpfs -x devtmpfs -x overlay -x revokefs-fuse"; free = "free -h"; toupper = "tr [:lower:] [:upper:]"; tolower = "tr [:upper:] [:lower:]"; rebuild = '' nixos-rebuild switch --flake "$HOME/.local/os#" --use-remote-sudo ''; ":r" = "!!"; }; programs.bash.sessionVariables = { NIX_SHELL_PRESERVE_PROMPT = 1; }; programs.tmux.enable = true; programs.tmux.terminal = "xterm-256color"; programs.tmux.baseIndex = 1; programs.tmux.clock24 = true; programs.tmux.prefix = "C-a"; programs.tmux.escapeTime = 0; programs.tmux.extraConfig = '' set-option -g status-position top setw -g automatic-rename on set -g renumber-windows on set -g set-titles on set -g set-titles-string "#T" ''; dconf.settings = { "org/gnome/desktop/wm/keybindings" = { move-to-workspace-left = ["Left"]; move-to-workspace-right = ["Right"]; switch-to-workspace-left = ["Left"]; switch-to-workspace-right = ["Right"]; switch-applications = ["Tab"]; switch-applications-backward = ["Tab"]; switch-windows = ["Tab"]; switch-windows-backward = ["Tab"]; }; "org/gnome/settings-daemon/plugins/media-keys" = { custom-keybindings = ["/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"]; }; "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { binding = "t"; command = "kgx"; name = "gnome-console"; }; "org/gnome/desktop/interface" = { clock-show-weekday = true; }; "org/gnome/desktop/peripherals/touchpad" = { tap-to-click = true; two-finger-scrolling-enabled = true; }; "org/gnome/shell" = rec { enabled-extensions = [ "trayIconsReloaded@selfmade.pl" "AlphabeticalAppGrid@stuarthayhurst" "clipboard-history@alexsaveau.dev" "noannoyance@daase.net" ]; # disabled-extensions = builtins.filter (x: ! builtins.elem x enabled-extensions) disabled-extensions; favorite-apps = [ "firefox.desktop" "chromium-browser.desktop" "org.gnome.Console.desktop" "org.gnome.Nautilus.desktop" ]; }; }; }