From 3bc2bf3fc5f14e6e7fe0a7e916007ee705ffdcb4 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Sun, 3 Nov 2024 23:41:44 +0100 Subject: [PATCH] purge home-manager --- hosts/temperance/configuration.nix | 7 - modules/options/system/module.nix | 2 +- modules/programs/gui/module.nix | 1 - modules/programs/gui/waybar.nix | 325 ----------------------------- modules/programs/other/direnv.nix | 7 - modules/services/mako.nix | 17 ++ modules/services/module.nix | 2 +- 7 files changed, 19 insertions(+), 342 deletions(-) delete mode 100644 modules/programs/gui/waybar.nix create mode 100644 modules/services/mako.nix diff --git a/hosts/temperance/configuration.nix b/hosts/temperance/configuration.nix index 072bab8..8726e76 100644 --- a/hosts/temperance/configuration.nix +++ b/hosts/temperance/configuration.nix @@ -71,9 +71,6 @@ in { desktops.hyprland.enable = true; programs = { - launchers = { - fuzzel.enable = true; - }; media = { beets.enable = true; @@ -110,12 +107,8 @@ in { ssh.enable = true; btop.enable = true; nh.enable = true; - waybar.enable = true; # steam.enable = true; }; - services = { - dunst.enable = true; - }; }; } diff --git a/modules/options/system/module.nix b/modules/options/system/module.nix index 108b275..51c2c46 100644 --- a/modules/options/system/module.nix +++ b/modules/options/system/module.nix @@ -47,7 +47,7 @@ in { users = mkOption { type = listOf str; default = ["charlie"]; - description = "A list of home-manager users on the system."; + description = "A list of users on the system."; }; autoLogin = mkOption { diff --git a/modules/programs/gui/module.nix b/modules/programs/gui/module.nix index 45eded5..6c47248 100644 --- a/modules/programs/gui/module.nix +++ b/modules/programs/gui/module.nix @@ -4,7 +4,6 @@ _: { ./foot.nix ./spicetify.nix ./steam.nix - ./waybar.nix ./schizofox.nix ./minecraft.nix ]; diff --git a/modules/programs/gui/waybar.nix b/modules/programs/gui/waybar.nix deleted file mode 100644 index dc2c52b..0000000 --- a/modules/programs/gui/waybar.nix +++ /dev/null @@ -1,325 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.modules.programs.waybar; - inherit (config.modules.other.system) username; -in { - options.modules.programs.waybar.enable = lib.mkEnableOption "waybar"; - config = lib.mkIf cfg.enable { - home-manager.users.${username} = { - programs.waybar = { - enable = true; - package = pkgs.waybar; - settings.mainBar = { - gtk-layer-shell = true; - layer = "top"; - position = "bottom"; - modules-left = ["tray" "mpd"]; - modules-center = ["hyprland/workspaces"]; - modules-right = [ - "memory" - "pulseaudio" - "clock" - "backlight" - "battery" - ]; - - pulseaudio = { - tooltip = false; - scroll-step = "1"; - format = " {icon} {volume}%"; - format-muted = " 󰸈 {volume}%"; - format-icons = {default = ["󰕿" "󰖀" "󰕾"];}; - on-click = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; - }; - - "hyprland/workspaces" = { - sort-by-name = true; - sort-by-coordinates = false; - on-click = "activate"; - #on-scroll = "~/Scripts/cycle_workspace.sh 1"; - active-only = true; - format = "{icon}"; - format-icons = { - "1" = "1"; - "2" = "2"; - "3" = "3"; - "4" = "4"; - "5" = "5"; - "6" = "6"; - "7" = "7"; - "8" = "8"; - "9" = "9"; - "10" = "10"; - "11" = "1"; - "12" = "2"; - "13" = "3"; - "14" = "4"; - "15" = "5"; - "16" = "6"; - "17" = "7"; - "18" = "8"; - "19" = "9"; - "20" = "10"; - "21" = "1"; - "22" = "2"; - "23" = "3"; - "24" = "4"; - "25" = "5"; - "26" = "6"; - "27" = "7"; - "28" = "8"; - "29" = "9"; - "30" = "10"; - }; - }; - - tray = { - icon-size = 12; - spacing = 5; - }; - - # 󰃰 - clock = { - interval = 1; - format = " {:%a %d %b %H:%M:%S}"; - }; - - battery = { - interval = 10; - states = { - good = 75; - warning = 20; - critical = 10; - }; - format = "{icon}{capacity}%"; - format-charging = "󰚥{icon}{capacity}%"; - format-discharging = "{icon}{capacity}%"; - format-icons = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; - format-charging-icons = ["󰢟" "󰢜" "󰂆" "󰂇" "󰂈" "󰢝" "󰂉" "󰢞" "󰂊" "󰂋" "󰂅"]; - }; - - cpu = { - interval = 1; - format = "󰻠 {}%"; - max-length = 10; - }; - - memory = { - interval = 1; - format = "󰍛 {}%"; - max-length = 10; - }; - "hyprland/window" = { - format = "{}"; - separate-outputs = true; - }; - - mpd = { - format = "󰝚 {artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})"; - format-disconnected = "󰝚 Disconnected"; - format-stopped = "󰝚 Stopped"; - interval = 1; - tooltip-format = "MPD (connected)"; - tooltip-format-disconnected = "MPD (disconnected)"; - on-click = "mpc toggle"; - }; - }; - - style = '' - @define-color base #000000; - @define-color inactive #ab8f44; - @define-color active #1565c0; - - @define-color text #ffffff; - - * { - border-radius: 1px; - font-family: ComicShannsMono Nerd Font; - - font-size: 16px; - } - - window#waybar { - background-color: alpha(@base, 1.0); - border-radius: 0px; - } - - window#waybar.hidden { - opacity: 0.2; - } - - #window { - margin-top: 2px; - margin-bottom: 2px; - padding-left: 2px; - padding-right: 2px; - background: @base; - color: @text; - font-family: ComicShannsMono Nerd Font; - } - - #workspaces { - padding-left: 5px; - } - - #workspaces button { - border-radius: 0px; - padding-top: 0px; - padding-right: 0px; - padding-bottom: 0px; - padding-left: 0px; - margin-top: 2px; - margin-right: 2px; - margin-bottom: 2px; - margin-left: 2px; - background-color: @inactive; - color: @text; - min-width: 15px; - } - - #workspaces button.active { - padding-top: 0px; - padding-bottom: 0px; - padding-right: 0px; - padding-left: 0px; - margin-top: 2px; - margin-right: 2px; - margin-bottom: 2px; - margin-left: 2px; - background-color: @active; - color: @base; - min-width: 15px; - } - - #workspaces button.urgent { - background-color: @red; - } - - .modules-left > widget:first-child > #workspaces { - margin-left: 0; - } - - .modules-right > widget:first-child > #workspaces { - margin-right: 0; - } - - #pulseaudio { - margin-top: 2px; - margin-bottom: 2px; - margin-left: 2px; - margin-right: 2px; - padding-left: 0px; - padding-right: 0px; - transition: none; - background: @base; - color: @text; - } - #memory { - color: @text; - } - #battery { - margin-top: 3px; - margin-bottom: 3px; - margin-left: 8px; - padding-left: 10px; - padding-right: 10px; - transition: none; - background: @base; - color: @text; - } - - @keyframes blink { - to { - background-color: @red; - } - } - - #battery.charging, #battery.plugged { - background-color: @base; - } - - #battery.critical:not(.charging) { - background-color: @base; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; - } - - #backlight { - margin-top: 3px; - margin-bottom: 3px; - margin-left: 8px; - padding-left: 10px; - padding-right: 10px; - transition: none; - background: @base; - color: @yellow; - } - #clock { - margin-top: 3px; - margin-bottom: 3px; - margin-left: 8px; - padding-left: 10px; - padding-right: 10px; - transition-property: min-width; - transition-duration: 0.5s; - background: @base; - color: @text; - } - - #tray { - margin-top: 2px; - margin-bottom: 2px; - margin-left: 2px; - padding-left: 2px; - padding-right: 2px; - transition: none; - background: @base; - } - - #custom-power { - font-size: 20px; - margin-top: 3px; - margin-bottom: 3px; - margin-left: 8px; - margin-right: 8px; - padding-left: 10px; - padding-right: 10px; - transition: none; - background: @base; - color: @red; - } - - - - #custom-media { - margin-top: 3px; - margin-bottom: 3px; - margin-left: 8px; - padding-left: 10px; - padding-right: 10px; - transition: none; - background: @mantle; - } - - #mpd { - margin-top: 3px; - margin-bottom: 3px; - margin-left: 8px; - padding-left: 10px; - padding-right: 10px; - transition: none; - background: @base; - color: @text; - } - ''; - }; - }; - }; -} diff --git a/modules/programs/other/direnv.nix b/modules/programs/other/direnv.nix index 8f02061..719dd49 100644 --- a/modules/programs/other/direnv.nix +++ b/modules/programs/other/direnv.nix @@ -18,13 +18,6 @@ in { enableBashIntegration = true; enableFishIntegration = true; - enableZshIntegration = true; - }; - home-manager.users.${username} = { - programs.direnv = { - # yes stupid direnv does _not_ work with nushell in nixos options - enableNushellIntegration = true; - }; }; }; } diff --git a/modules/services/mako.nix b/modules/services/mako.nix new file mode 100644 index 0000000..4bbdc0e --- /dev/null +++ b/modules/services/mako.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: let + mako-wrapped = pkgs.symlinkJoin { + name = "mako-wrapped"; + paths = [pkgs.mako]; + buildInputs = [pkgs.makeWrapper]; + postBuild = '' + wrapProgram $out/bin/mako --add-flags "\ + --font 'Lexend 11' \ + --border-radius 8 \ + --padding 8 \ + --border-size 5 \ + --default-timeout 4000" + ''; + }; +in { + environment.systemPackages = [mako-wrapped]; +} diff --git a/modules/services/module.nix b/modules/services/module.nix index 6dc3325..59ee7a0 100644 --- a/modules/services/module.nix +++ b/modules/services/module.nix @@ -4,7 +4,7 @@ _: { ./locate.nix ./ssh.nix ./greetd.nix - ./dunst.nix + ./mako.nix ./mpd.nix ./firewall.nix ./kmscon.nix