From 916f51d50cd81790732b7e030883dd878c792c13 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Mon, 3 Jun 2024 22:10:25 -0400 Subject: [PATCH] home: code cleanup --- aly.nix | 3 +- homeManagerModules/apps/alacritty/default.nix | 4 +- homeManagerModules/apps/default.nix | 1 - homeManagerModules/apps/eza/default.nix | 2 +- homeManagerModules/apps/fuzzel/default.nix | 9 ++-- homeManagerModules/apps/librewolf/default.nix | 21 +++----- homeManagerModules/apps/swaylock/default.nix | 48 ++++++++----------- homeManagerModules/apps/tauon/default.nix | 12 ----- homeManagerModules/apps/thunar/default.nix | 11 +---- homeManagerModules/apps/tmux/default.nix | 14 +++--- homeManagerModules/default.nix | 2 - homeManagerModules/desktop/gnome/default.nix | 23 ++++----- homeManagerModules/services/default.nix | 2 +- .../services/syncthing/default.nix | 15 ------ 14 files changed, 55 insertions(+), 112 deletions(-) delete mode 100644 homeManagerModules/apps/tauon/default.nix delete mode 100644 homeManagerModules/services/syncthing/default.nix diff --git a/aly.nix b/aly.nix index c3fc7309..dadb296e 100644 --- a/aly.nix +++ b/aly.nix @@ -28,6 +28,7 @@ in { plexamp python3 ruby + tauon trayscale unstable.obsidian unstable.zoom-us @@ -36,7 +37,6 @@ in { ]; alyraffauf = { - services.syncthing.enable = false; desktop = { defaultApps = { enable = true; @@ -118,7 +118,6 @@ in { fzf.enable = true; neofetch.enable = true; neovim.enable = true; - tauon.enable = true; tmux.enable = true; vsCodium.enable = true; }; diff --git a/homeManagerModules/apps/alacritty/default.nix b/homeManagerModules/apps/alacritty/default.nix index 856ca834..9e02892c 100644 --- a/homeManagerModules/apps/alacritty/default.nix +++ b/homeManagerModules/apps/alacritty/default.nix @@ -14,8 +14,8 @@ settings = { colors = { primary = { - foreground = "${config.alyraffauf.desktop.theme.colors.text}"; background = "${config.alyraffauf.desktop.theme.colors.background}"; + foreground = "${config.alyraffauf.desktop.theme.colors.text}"; }; transparent_background_colors = true; draw_bold_text_with_bright_colors = true; @@ -30,7 +30,7 @@ selection.save_to_clipboard = true; window = { blur = true; - # decorations = "None"; + decorations = "None"; dynamic_padding = true; opacity = 0.8; }; diff --git a/homeManagerModules/apps/default.nix b/homeManagerModules/apps/default.nix index 7bc9caf7..0619cfae 100644 --- a/homeManagerModules/apps/default.nix +++ b/homeManagerModules/apps/default.nix @@ -19,7 +19,6 @@ ./neofetch ./neovim ./swaylock - ./tauon ./thunar ./tmux ./vsCodium diff --git a/homeManagerModules/apps/eza/default.nix b/homeManagerModules/apps/eza/default.nix index 83a0d94a..287e1ad6 100644 --- a/homeManagerModules/apps/eza/default.nix +++ b/homeManagerModules/apps/eza/default.nix @@ -9,9 +9,9 @@ config = lib.mkIf config.alyraffauf.apps.eza.enable { programs.eza = { enable = true; + extraOptions = ["--group-directories-first" "--header"]; git = true; icons = true; - extraOptions = ["--group-directories-first" "--header"]; }; }; } diff --git a/homeManagerModules/apps/fuzzel/default.nix b/homeManagerModules/apps/fuzzel/default.nix index a728cfb5..1d82a220 100644 --- a/homeManagerModules/apps/fuzzel/default.nix +++ b/homeManagerModules/apps/fuzzel/default.nix @@ -14,18 +14,21 @@ font = "${config.alyraffauf.desktop.theme.terminalFont.name}:size=${toString config.alyraffauf.desktop.theme.terminalFont.size}"; icon-theme = "${config.alyraffauf.desktop.theme.iconTheme.name}"; layer = "overlay"; - width = 36; lines = 3; terminal = config.alyraffauf.desktop.defaultApps.terminal.exe; + width = 36; + }; + border = { + radius = 10; + width = 2; }; - border = {width = 2;}; colors = { background = "${config.alyraffauf.desktop.theme.colors.background}CC"; + border = "${config.alyraffauf.desktop.theme.colors.primary}EE"; selection = "${config.alyraffauf.desktop.theme.colors.background}FF"; selection-match = "#e78284FF"; selection-text = "#f4b8e4FF"; text = "${config.alyraffauf.desktop.theme.colors.text}FF"; - border = "${config.alyraffauf.desktop.theme.colors.primary}EE"; }; }; }; diff --git a/homeManagerModules/apps/librewolf/default.nix b/homeManagerModules/apps/librewolf/default.nix index 8ef35f19..4e70a0f1 100644 --- a/homeManagerModules/apps/librewolf/default.nix +++ b/homeManagerModules/apps/librewolf/default.nix @@ -12,25 +12,18 @@ programs.librewolf = { enable = true; settings = { + "browser.safebrowsing.blockedURIs.enabled" = true; + "browser.safebrowsing.downloads.enabled" = true; "browser.safebrowsing.malware.enabled" = true; "browser.safebrowsing.phishing.enabled" = true; - "browser.safebrowsing.blockedURIs.enabled" = true; - - "browser.safebrowsing.provider.google4.gethashURL" = "https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"; - - "browser.safebrowsing.provider.google4.updateURL" = "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"; - "browser.safebrowsing.provider.google.gethashURL" = "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2"; - "browser.safebrowsing.provider.google.updateURL" = "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2&key=%GOOGLE_SAFEBROWSING_API_KEY%"; - "browser.safebrowsing.downloads.enabled" = true; - - "identity.fxaccounts.enabled" = true; - - "privacy.clearOnShutdown.history" = false; - - "middlemouse.paste" = false; + "browser.safebrowsing.provider.google4.gethashURL" = "https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"; + "browser.safebrowsing.provider.google4.updateURL" = "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"; "general.autoScroll" = true; + "identity.fxaccounts.enabled" = true; + "middlemouse.paste" = false; + "privacy.clearOnShutdown.history" = false; }; }; }; diff --git a/homeManagerModules/apps/swaylock/default.nix b/homeManagerModules/apps/swaylock/default.nix index dc31d89e..c581c86b 100644 --- a/homeManagerModules/apps/swaylock/default.nix +++ b/homeManagerModules/apps/swaylock/default.nix @@ -12,48 +12,38 @@ programs.swaylock.enable = true; xdg.configFile."swaylock/config".text = '' - font="${config.alyraffauf.desktop.theme.terminalFont.name}-Regular" - + bs-hl-color=e78284 + caps-lock-bs-hl-color=e78284 + caps-lock-key-hl-color=e78284 color=303446 - image=${config.alyraffauf.desktop.theme.wallpaper} - daemonize - - indicator-radius=120 - indicator-thickness=20 + font="${config.alyraffauf.desktop.theme.terminalFont.name}-Regular" + image=${config.alyraffauf.desktop.theme.wallpaper} indicator-caps-lock indicator-idle-visible - - key-hl-color=a6d189 - - separator-color=${config.alyraffauf.desktop.theme.colors.background}CC - - inside-color=303446cc - inside-clear-color=303446cc + indicator-radius=120 + indicator-thickness=20 inside-caps-lock-color=303446cc + inside-clear-color=303446cc + inside-color=303446cc inside-ver-color=303446cc inside-wrong-color=303446cc - - ring-color=${config.alyraffauf.desktop.theme.colors.primary}CC - ring-clear-color=85c1dccc - ring-caps-lock-color=e78284cc - ring-ver-color=a6d189cc - ring-wrong-color=e78284cc - - line-color=${config.alyraffauf.desktop.theme.colors.background}CC - line-clear-color=${config.alyraffauf.desktop.theme.colors.background}CC + key-hl-color=a6d189 line-caps-lock-color=${config.alyraffauf.desktop.theme.colors.background}CC + line-clear-color=${config.alyraffauf.desktop.theme.colors.background}CC + line-color=${config.alyraffauf.desktop.theme.colors.background}CC line-ver-color=${config.alyraffauf.desktop.theme.colors.background}CC line-wrong-color=${config.alyraffauf.desktop.theme.colors.background}CC - + ring-caps-lock-color=e78284cc + ring-clear-color=85c1dccc + ring-color=${config.alyraffauf.desktop.theme.colors.primary}CC + ring-ver-color=a6d189cc + ring-wrong-color=e78284cc + separator-color=${config.alyraffauf.desktop.theme.colors.background}CC + text-caps-lock-color=c6d0f5 text-clear-color=c6d0f5 text-ver-color=c6d0f5 text-wrong-color=c6d0f5 - - bs-hl-color=e78284 - caps-lock-key-hl-color=e78284 - caps-lock-bs-hl-color=e78284 - text-caps-lock-color=c6d0f5 ''; }; } diff --git a/homeManagerModules/apps/tauon/default.nix b/homeManagerModules/apps/tauon/default.nix deleted file mode 100644 index 74fd6e84..00000000 --- a/homeManagerModules/apps/tauon/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: { - options = {alyraffauf.apps.tauon.enable = lib.mkEnableOption "Enables Tauon.";}; - - config = lib.mkIf config.alyraffauf.apps.tauon.enable { - home.packages = with pkgs; [tauon]; - }; -} diff --git a/homeManagerModules/apps/thunar/default.nix b/homeManagerModules/apps/thunar/default.nix index 7e9f7e24..6c52eed8 100644 --- a/homeManagerModules/apps/thunar/default.nix +++ b/homeManagerModules/apps/thunar/default.nix @@ -18,18 +18,9 @@ ]; xdg.configFile."xfce4/helpers.rc".text = '' - TerminalEmulator=alacritty FileManager=thunar + TerminalEmulator=alacritty WebBrowser=firefox ''; - - # xfconf.settings = { - # thunar = { - # "last-menubar-visible" = false; - # "misc-confirm-close-multiple-tabs" = false; - # "misc-show-delete-action" = true; - # "misc-single-click" = true; - # }; - # }; }; } diff --git a/homeManagerModules/apps/tmux/default.nix b/homeManagerModules/apps/tmux/default.nix index dea248c6..211f19c4 100644 --- a/homeManagerModules/apps/tmux/default.nix +++ b/homeManagerModules/apps/tmux/default.nix @@ -20,15 +20,15 @@ ]; terminal = "tmux-256color"; extraConfig = '' - set-option -g status-bg plum4 - set-option -g pane-active-border-style fg=plum4 + run-shell ${pkgs.tmuxPlugins.battery}/share/tmux-plugins/battery/battery.tmux + run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux + run-shell ${pkgs.tmuxPlugins.resurrect}/share/tmux-plugins/resurrect/resurrect.tmux + run-shell ${pkgs.tmuxPlugins.weather}/share/tmux-plugins/weather/tmux-weather.tmux + set -g status-right '#{cpu_percentage} CPU | #{battery_percentage} BAT | %I:%M %p | #{weather}' set-option -g @tmux-weather-format "%x+%t" set-option -g @tmux-weather-units "u" - set -g status-right '#{cpu_percentage} CPU | #{battery_percentage} BAT | %I:%M %p | #{weather}' - run-shell ${pkgs.tmuxPlugins.battery}/share/tmux-plugins/battery/battery.tmux - run-shell ${pkgs.tmuxPlugins.resurrect}/share/tmux-plugins/resurrect/resurrect.tmux - run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux - run-shell ${pkgs.tmuxPlugins.weather}/share/tmux-plugins/weather/tmux-weather.tmux + set-option -g pane-active-border-style fg=plum4 + set-option -g status-bg plum4 ''; }; }; diff --git a/homeManagerModules/default.nix b/homeManagerModules/default.nix index 103071fb..3eeb41be 100644 --- a/homeManagerModules/default.nix +++ b/homeManagerModules/default.nix @@ -7,9 +7,7 @@ imports = [./apps ./desktop ./services ./scripts]; nixpkgs = { - # Configure nixpkgs instance config = { - # Enable unfree packages allowUnfree = true; }; }; diff --git a/homeManagerModules/desktop/gnome/default.nix b/homeManagerModules/desktop/gnome/default.nix index 6d5b69bf..5e4c67a5 100644 --- a/homeManagerModules/desktop/gnome/default.nix +++ b/homeManagerModules/desktop/gnome/default.nix @@ -21,19 +21,6 @@ "org/gnome/mutter".dynamic-workspaces = true; "org/gnome/mutter".edge-tiling = true; "org/gnome/mutter".workspaces-only-on-primary = true; - "org/gnome/shell/extensions/blur-my-shell/overview".style-components = 3; - "org/gnome/shell/extensions/blur-my-shell/panel".blur = false; - "org/gnome/shell/extensions/blur-my-shell/panel".customize = true; - "org/gnome/shell/extensions/blur-my-shell/panel".style-panel = 0; - "org/gnome/shell/extensions/blur-my-shell/panel".override-background = - false; - "org/gnome/shell/extensions/blur-my-shell/panel".override-background-dynamically = - false; - "org/gnome/shell/extensions/blur-my-shell/panel".unblur-in-overview = - true; - "org/gnome/system/location".enabled = true; - "org/gtk/gtk4/settings/file-chooser".sort-directories-first = true; - "org/gtk/settings/file-chooser".sort-directories-first = true; "org/gnome/shell".enabled-extensions = [ "appindicatorsupport@rgcjonas.gmail.com" "blur-my-shell@aunetx" @@ -44,6 +31,16 @@ "tiling-assistant@leleat-on-github" "drive-menu@gnome-shell-extensions.gcampax.github.com" ]; + "org/gnome/shell/extensions/blur-my-shell/overview".style-components = 3; + "org/gnome/shell/extensions/blur-my-shell/panel".blur = false; + "org/gnome/shell/extensions/blur-my-shell/panel".customize = true; + "org/gnome/shell/extensions/blur-my-shell/panel".override-background = false; + "org/gnome/shell/extensions/blur-my-shell/panel".override-background-dynamically = false; + "org/gnome/shell/extensions/blur-my-shell/panel".style-panel = 0; + "org/gnome/shell/extensions/blur-my-shell/panel".unblur-in-overview = true; + "org/gnome/system/location".enabled = true; + "org/gtk/gtk4/settings/file-chooser".sort-directories-first = true; + "org/gtk/settings/file-chooser".sort-directories-first = true; }; }; } diff --git a/homeManagerModules/services/default.nix b/homeManagerModules/services/default.nix index a97863ed..ceb7c965 100644 --- a/homeManagerModules/services/default.nix +++ b/homeManagerModules/services/default.nix @@ -4,5 +4,5 @@ pkgs, ... }: { - imports = [./syncthing ./easyeffects ./mpd]; + imports = [./easyeffects ./mpd]; } diff --git a/homeManagerModules/services/syncthing/default.nix b/homeManagerModules/services/syncthing/default.nix deleted file mode 100644 index 6f678cf3..00000000 --- a/homeManagerModules/services/syncthing/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: { - options = { - alyraffauf.services.syncthing.enable = - lib.mkEnableOption "Enables syncthing as user."; - }; - - config = lib.mkIf config.alyraffauf.services.syncthing.enable { - services.syncthing.enable = true; - }; -}