diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/communication/neomutt/neomutt.nix | 28 | ||||
| -rw-r--r-- | modules/desktop/waybar/lib.nix | 4 | ||||
| -rw-r--r-- | modules/desktop/waybar/module/battery.nix | 6 | ||||
| -rw-r--r-- | modules/desktop/waybar/module/cpu.nix | 2 | ||||
| -rw-r--r-- | modules/desktop/waybar/module/date.nix | 2 | ||||
| -rw-r--r-- | modules/desktop/waybar/module/default.nix | 1 | ||||
| -rw-r--r-- | modules/desktop/waybar/module/memory.nix | 2 | ||||
| -rw-r--r-- | modules/desktop/waybar/module/network.nix | 2 | ||||
| -rw-r--r-- | modules/desktop/waybar/module/time.nix | 2 | ||||
| -rw-r--r-- | modules/desktop/waybar/module/volume.nix | 2 | ||||
| -rw-r--r-- | modules/desktop/waybar/module/vpn.nix | 1 | ||||
| -rw-r--r-- | modules/desktop/waybar/module/window.nix | 3 | ||||
| -rw-r--r-- | modules/desktop/waybar/module/workspaces.nix | 1 | ||||
| -rw-r--r-- | modules/desktop/waybar/style.nix | 2 | ||||
| -rw-r--r-- | modules/networking/bluetui/default.nix | 22 | ||||
| -rw-r--r-- | modules/networking/impala/default.nix | 22 | ||||
| -rw-r--r-- | modules/scripts/default.nix | 33 | ||||
| -rw-r--r-- | modules/security/enteauth/default.nix | 31 | ||||
| -rw-r--r-- | modules/terminal/kitty/default.nix | 2 | ||||
| -rw-r--r-- | modules/web/w3m/default.nix | 22 |
20 files changed, 83 insertions, 107 deletions
diff --git a/modules/communication/neomutt/neomutt.nix b/modules/communication/neomutt/neomutt.nix index 734bf7d..fd97be8 100644 --- a/modules/communication/neomutt/neomutt.nix +++ b/modules/communication/neomutt/neomutt.nix @@ -5,29 +5,25 @@ pkgs, ... }: -let - neomuttDesktopItem = pkgs.makeDesktopItem { - name = "neomutt"; - desktopName = "NeoMutt"; - exec = "${lib.getExe config.terminal.kitty.package} --class neomutt -e ${lib.getExe config.programs.neomutt.package}"; - icon = "kitty"; - categories = [ - "Network" - "Email" - ]; - comment = "Terminal email client"; - terminal = false; - type = "Application"; - }; -in { config = lib.mkIf config.communication.neomutt.enable { + xdg.desktopEntries."neomutt" = { + name = "NeoMutt"; + exec = "${lib.getExe config.terminal.kitty.package} --class neomutt -e ${lib.getExe config.programs.neomutt.package}"; + icon = "kitty"; + categories = [ + "Network" + "Email" + ]; + comment = "Terminal email client"; + terminal = false; + type = "Application"; + }; xdg.mimeApps.defaultApplications = { "x-scheme-handler/mailto" = "neomutt.desktop"; }; home.packages = with pkgs; [ urlscan - neomuttDesktopItem ]; xdg.configFile."neomutt/mailcap".text = '' text/html; ${lib.getExe' config.web.w3m.package "w3m"} -dump -cols 100 -T text/html '%s'; copiousoutput; nametemplate=%s.html diff --git a/modules/desktop/waybar/lib.nix b/modules/desktop/waybar/lib.nix index 9053cd5..3eaaab0 100644 --- a/modules/desktop/waybar/lib.nix +++ b/modules/desktop/waybar/lib.nix @@ -1,6 +1,6 @@ -{ lib, ... }: +{ ... }: let - mkIcon = color: icon: "<span foreground='${color}' font_size='125%'>${icon}</span>"; + mkIcon = color: icon: "<span foreground='${color}' font_size='120%'>${icon}</span>"; in { inherit mkIcon; diff --git a/modules/desktop/waybar/module/battery.nix b/modules/desktop/waybar/module/battery.nix index 05ae449..e17d7ea 100644 --- a/modules/desktop/waybar/module/battery.nix +++ b/modules/desktop/waybar/module/battery.nix @@ -1,4 +1,4 @@ -{ config, mkIcon }: +{ config, mkIcon, ... }: with config.scheme.withHashtag; let iconColor = base09; @@ -6,7 +6,7 @@ in { format = "${mkIcon iconColor "{icon}"} {capacity}%"; format-charging = "${mkIcon iconColor ""} {capacity}%"; - format-plugged = "${mkIcon iconColor ""} {capacity}%"; + format-plugged = "${mkIcon iconColor ""} {capacity}%"; format-alt = "{time} {icon}"; format-icons = [ "" @@ -16,7 +16,7 @@ in "" "" "" - "" + "" "" "" ]; diff --git a/modules/desktop/waybar/module/cpu.nix b/modules/desktop/waybar/module/cpu.nix index d366f44..e153b32 100644 --- a/modules/desktop/waybar/module/cpu.nix +++ b/modules/desktop/waybar/module/cpu.nix @@ -1,4 +1,4 @@ -{ config, mkIcon }: +{ config, mkIcon, ... }: with config.scheme.withHashtag; let iconColor = base0D; diff --git a/modules/desktop/waybar/module/date.nix b/modules/desktop/waybar/module/date.nix index 5d21e68..9f54514 100644 --- a/modules/desktop/waybar/module/date.nix +++ b/modules/desktop/waybar/module/date.nix @@ -1,4 +1,4 @@ -{ config, mkIcon }: +{ config, mkIcon, ... }: with config.scheme.withHashtag; let iconColor = base0E; diff --git a/modules/desktop/waybar/module/default.nix b/modules/desktop/waybar/module/default.nix index c1c8048..2f9f83c 100644 --- a/modules/desktop/waybar/module/default.nix +++ b/modules/desktop/waybar/module/default.nix @@ -2,6 +2,7 @@ config, lib, pkgs, + ... }: let inherit (import ../lib.nix { inherit lib; }) mkIcon; diff --git a/modules/desktop/waybar/module/memory.nix b/modules/desktop/waybar/module/memory.nix index 40e313f..53174c2 100644 --- a/modules/desktop/waybar/module/memory.nix +++ b/modules/desktop/waybar/module/memory.nix @@ -1,4 +1,4 @@ -{ config, mkIcon }: +{ config, mkIcon, ... }: with config.scheme.withHashtag; let iconColor = base0F; diff --git a/modules/desktop/waybar/module/network.nix b/modules/desktop/waybar/module/network.nix index f20121f..48cd6f3 100644 --- a/modules/desktop/waybar/module/network.nix +++ b/modules/desktop/waybar/module/network.nix @@ -1,4 +1,4 @@ -{ config, mkIcon }: +{ config, mkIcon, ... }: with config.scheme.withHashtag; let iconColor = base0B; diff --git a/modules/desktop/waybar/module/time.nix b/modules/desktop/waybar/module/time.nix index f877674..adc8632 100644 --- a/modules/desktop/waybar/module/time.nix +++ b/modules/desktop/waybar/module/time.nix @@ -1,4 +1,4 @@ -{ config, mkIcon }: +{ config, mkIcon, ... }: with config.scheme.withHashtag; let iconColor = base08; diff --git a/modules/desktop/waybar/module/volume.nix b/modules/desktop/waybar/module/volume.nix index 0aa2b94..afb8d4e 100644 --- a/modules/desktop/waybar/module/volume.nix +++ b/modules/desktop/waybar/module/volume.nix @@ -1,4 +1,4 @@ -{ config, mkIcon }: +{ config, mkIcon, ... }: with config.scheme.withHashtag; let iconColor = base0A; diff --git a/modules/desktop/waybar/module/vpn.nix b/modules/desktop/waybar/module/vpn.nix index aa74499..7eb8879 100644 --- a/modules/desktop/waybar/module/vpn.nix +++ b/modules/desktop/waybar/module/vpn.nix @@ -3,6 +3,7 @@ lib, pkgs, mkIcon, + ... }: with config.scheme.withHashtag; let diff --git a/modules/desktop/waybar/module/window.nix b/modules/desktop/waybar/module/window.nix index 0e708c2..06f0c5b 100644 --- a/modules/desktop/waybar/module/window.nix +++ b/modules/desktop/waybar/module/window.nix @@ -1,5 +1,4 @@ -{ config }: -with config.scheme.withHashtag; +{ ... }: { expand = true; } diff --git a/modules/desktop/waybar/module/workspaces.nix b/modules/desktop/waybar/module/workspaces.nix index c8a99c2..9f9e3be 100644 --- a/modules/desktop/waybar/module/workspaces.nix +++ b/modules/desktop/waybar/module/workspaces.nix @@ -49,5 +49,6 @@ in "class<aria2-run>" = mkWindowRewrite config.scripts.aria2-run.enable "#8BE9FD" ""; "class<screen-recording>" = mkWindowRewrite config.scripts.screen-recording.enable "#FF5555" ""; "class<system-monitor>" = mkWindowRewrite config.scripts.system-monitor.enable "#50FA7B" ""; + "class<neovim>" = mkWindowRewrite config.development.nixvim.enable "#005900" ""; }; } diff --git a/modules/desktop/waybar/style.nix b/modules/desktop/waybar/style.nix index fead24e..0f697c0 100644 --- a/modules/desktop/waybar/style.nix +++ b/modules/desktop/waybar/style.nix @@ -34,7 +34,7 @@ with config.scheme.withHashtag; } #workspaces button { - padding: 5px; + padding: 0px 5px; color: ${base07}; border: 1px solid ${base03}; border-radius: 0; diff --git a/modules/networking/bluetui/default.nix b/modules/networking/bluetui/default.nix index c6cb96b..339c822 100644 --- a/modules/networking/bluetui/default.nix +++ b/modules/networking/bluetui/default.nix @@ -5,18 +5,6 @@ pkgs, ... }: -let - bluetuiDesktopItem = pkgs.makeDesktopItem { - name = "bluetui"; - desktopName = "BlueTUI"; - exec = "${lib.getExe config.terminal.kitty.package} --class bluetui -e ${lib.getExe config.networking.bluetui.package}"; - icon = "kitty"; - categories = [ "Network" ]; - comment = "Bluetooth TUI client"; - terminal = false; - type = "Application"; - }; -in { imports = [ ./assertions.nix @@ -28,9 +16,17 @@ in }; config = lib.mkIf config.networking.bluetui.enable { + xdg.desktopEntries."bluetui" = { + name = "BlueTUI"; + exec = "${lib.getExe config.terminal.kitty.package} --class bluetui -e ${lib.getExe config.networking.bluetui.package}"; + icon = "kitty"; + categories = [ "Network" ]; + comment = "Bluetooth TUI client"; + terminal = false; + type = "Application"; + }; home.packages = [ config.networking.bluetui.package - bluetuiDesktopItem ]; }; } diff --git a/modules/networking/impala/default.nix b/modules/networking/impala/default.nix index 81b9df5..b850dcc 100644 --- a/modules/networking/impala/default.nix +++ b/modules/networking/impala/default.nix @@ -5,18 +5,6 @@ pkgs, ... }: -let - impalaDesktopItem = pkgs.makeDesktopItem { - name = "impala"; - desktopName = "Impala"; - exec = "${lib.getExe config.terminal.kitty.package} --class impala -e ${lib.getExe config.networking.impala.package}"; - icon = "kitty"; - categories = [ "Network" ]; - comment = "TUI for managing wifi on Linux"; - terminal = false; - type = "Application"; - }; -in { imports = [ ./assertions.nix @@ -28,9 +16,17 @@ in }; config = lib.mkIf config.networking.impala.enable { + xdg.desktopEntries."impala" = { + name = "Impala"; + exec = "${lib.getExe config.terminal.kitty.package} --class impala -e ${lib.getExe config.networking.impala.package}"; + icon = "kitty"; + categories = [ "Network" ]; + comment = "TUI for managing wifi on Linux"; + terminal = false; + type = "Application"; + }; home.packages = [ config.networking.impala.package - impalaDesktopItem ]; xdg.mimeApps.defaultApplications = { diff --git a/modules/scripts/default.nix b/modules/scripts/default.nix index 5f1820e..1de4b61 100644 --- a/modules/scripts/default.nix +++ b/modules/scripts/default.nix @@ -17,25 +17,18 @@ ]; config = { - home.packages = - [ ] - ++ lib.filter (x: x != null) (lib.mapAttrsToList (_: s: s.package) config.scripts) - ++ lib.filter (x: x != null) ( - lib.mapAttrsToList ( - name: sc: - if sc.enable && sc.desktop.enable then - pkgs.makeDesktopItem { - name = name; - desktopName = sc.desktop.displayName; - exec = "${lib.getExe config.terminal.kitty.package} --class ${name} -e ${lib.getExe sc.package}"; - icon = "kitty"; - categories = [ "Utility" ]; - terminal = false; - type = "Application"; - } - else - null - ) config.scripts - ); + home.packages = lib.filter (x: x != null) (lib.mapAttrsToList (_: s: s.package) config.scripts); + + xdg.desktopEntries = lib.mapAttrs' ( + name: sc: + lib.nameValuePair name { + name = sc.desktop.displayName; + exec = "${lib.getExe config.terminal.kitty.package} --class ${name} -e ${lib.getExe sc.package}"; + icon = "kitty"; + categories = [ "Utility" ]; + terminal = false; + type = "Application"; + } + ) (lib.filterAttrs (_: sc: sc.enable && sc.desktop.enable) config.scripts); }; } diff --git a/modules/security/enteauth/default.nix b/modules/security/enteauth/default.nix index 064f697..a883d1a 100644 --- a/modules/security/enteauth/default.nix +++ b/modules/security/enteauth/default.nix @@ -20,25 +20,8 @@ let } \ --run "echo 'password' | ${pkgs.gnome-keyring}/bin/gnome-keyring-daemon --unlock --components=secrets" - rm -rf $out/share/applications/* - - ln -s ${customDesktopItem}/share/applications/* $out/share/applications/ ''; }; - - customDesktopItem = pkgs.makeDesktopItem { - name = "enteauth"; - exec = "enteauth"; - icon = "io.ente.auth"; - comment = "End-to-end encrypted 2FA authenticator"; - desktopName = "Ente Auth"; - genericName = "2FA Authenticator"; - categories = [ - "Utility" - "Security" - ]; - terminal = false; - }; in { options.security.enteauth = { @@ -53,6 +36,20 @@ in config = lib.mkIf config.security.enteauth.enable { home.packages = [ config.security.enteauth.package ]; + xdg.desktopEntries."enteauth" = { + name = "Ente Auth"; + exec = "enteauth"; + icon = "io.ente.auth"; + comment = "End-to-end encrypted 2FA authenticator"; + genericName = "2FA Authenticator"; + categories = [ + "Utility" + "Security" + ]; + terminal = false; + type = "Application"; + }; + xdg.mimeApps.defaultApplications = { "x-scheme-handler/enteauth" = "enteauth.desktop"; }; diff --git a/modules/terminal/kitty/default.nix b/modules/terminal/kitty/default.nix index 5df4bca..68824a9 100644 --- a/modules/terminal/kitty/default.nix +++ b/modules/terminal/kitty/default.nix @@ -36,7 +36,7 @@ font_family = config.fonts.normal; filter_notification = "all"; update_check_interval = 0; - scrollback_indicator_opacity = "0.5"; + scrollbar_indicator_opacity = "0.5"; dynamic_background_opacity = false; enable_audio_bell = false; diff --git a/modules/web/w3m/default.nix b/modules/web/w3m/default.nix index 5316e04..00e8d2a 100644 --- a/modules/web/w3m/default.nix +++ b/modules/web/w3m/default.nix @@ -5,18 +5,6 @@ pkgs, ... }: -let - w3mDesktopItem = pkgs.makeDesktopItem { - name = "w3m"; - desktopName = "w3m"; - exec = "${lib.getExe config.terminal.kitty.package} --class w3m -e ${lib.getExe' config.web.w3m.package "w3m"}"; - icon = "kitty"; - categories = [ "Network" ]; - comment = "Text-based web browser"; - terminal = false; - type = "Application"; - }; -in { imports = [ ./assertions.nix @@ -33,10 +21,18 @@ in }; config = lib.mkIf config.web.w3m.enable { + xdg.desktopEntries."w3m" = { + name = "w3m"; + exec = "${lib.getExe config.terminal.kitty.package} --class w3m -e ${lib.getExe' config.web.w3m.package "w3m"}"; + icon = "kitty"; + categories = [ "Network" ]; + comment = "Text-based web browser"; + terminal = false; + type = "Application"; + }; programs.w3m.enable = true; home.packages = [ config.web.w3m.package - w3mDesktopItem ]; }; } |
