From 06d2c53b0c2ec8d154b7e32e98fcd12fe290542f Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 23 Jan 2024 19:49:29 +0000 Subject: [PATCH 1/4] Switch order of notification and audio waybar modules Switch clock module back to full form by default --- home/hyprland/waybar/default.nix | 6 +++--- home/hyprland/waybar/style.css | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/home/hyprland/waybar/default.nix b/home/hyprland/waybar/default.nix index a11e582c..86b28c0c 100644 --- a/home/hyprland/waybar/default.nix +++ b/home/hyprland/waybar/default.nix @@ -17,8 +17,8 @@ "modules-left" = [ "hyprland/window" "mpris" ]; "modules-center" = [ "hyprland/workspaces" ]; "modules-right" = [ - "pulseaudio" "custom/notification" + "pulseaudio" "clock" "custom/separator" "backlight" @@ -112,8 +112,8 @@ format-icons = [ "󱃃" "󰔏" "󱃂" ]; }; clock = { - format = "{:󰥔 %R}"; - format-alt = "{:󰃭 %Y-%m-%d 󰥔 %R}"; + format = "{:󰃭 %Y-%m-%d 󰥔 %R}"; + format-alt = "{:󰥔 %R}"; tooltip-format = "{calendar}"; calendar = { mode = "month"; diff --git a/home/hyprland/waybar/style.css b/home/hyprland/waybar/style.css index e93008a6..2589b12a 100644 --- a/home/hyprland/waybar/style.css +++ b/home/hyprland/waybar/style.css @@ -106,10 +106,10 @@ tooltip { color: @red; } -#pulseaudio { +#custom-notification { color: @red; } -#custom-notification { +#pulseaudio { color: @green; } #clock { From c3599f0f453e6b83c0ab14f345cdcf639ef64ffa Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 23 Jan 2024 19:53:22 +0000 Subject: [PATCH 2/4] Update emacs config before starting daemon Remove leftover exec starting btm --- home/hyprland/config.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/home/hyprland/config.nix b/home/hyprland/config.nix index 5c29d5f7..a5ca5566 100644 --- a/home/hyprland/config.nix +++ b/home/hyprland/config.nix @@ -21,9 +21,6 @@ in '' env = GRIM_DEFAULT_DIR=${config.xdg.userDirs.pictures}/Grim exec-once = hyprctl setcursor ${cursorName} ${cursorSize} - exec-once = dbus-update-activation-environment --systemd --all - exec-once = systemctl --user import-environment WAYLAND_DISPLAY QT_QPA_PLATFORMTHEME - exec-once = systemctl --user restart xdg-desktop-portal.service xdg-desktop-portal-hyprland.service avizo.service gestures:workspace_swipe = true @@ -224,9 +221,11 @@ in '' bindm = SUPER, mouse:272, movewindow bindm = SUPER, mouse:273, resizewindow - exec-once = emacs --fg-daemon + exec-once = dbus-update-activation-environment --systemd --all + exec-once = systemctl --user import-environment WAYLAND_DISPLAY QT_QPA_PLATFORMTHEME + + exec-once = git -C $HOME/.emacs pull --ff-only; emacs --fg-daemon exec-once = swaync exec-once = ${pkgs.hyprpaper}/bin/hyprpaper exec-once = ${pkgs.dex}/bin/dex --autostart - exec-once = [workspace name:btm silent] '' From 92378190f1b8400f24cbbf3172c683a761429d89 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 23 Jan 2024 19:53:52 +0000 Subject: [PATCH 3/4] Properly enable pipewire from nixos wiki setup Disable hardware.audio, enable pipewire addons Move xdg mime definitions from home manager to system level Consolidate xdg portal options in desktop.nix --- home/hyprland/default.nix | 27 --------------------------- system/desktop.nix | 20 +++++++++++++------- system/hyprland.nix | 32 ++++++++++++++++++++++++++------ 3 files changed, 39 insertions(+), 40 deletions(-) diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index d1f2e1f6..77449e06 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -107,32 +107,5 @@ ''; "swaync/style.css".source = ./swaync/style.css; }; - mimeApps = rec { - enable = true; - defaultApplications = { - "application/pdf" = [ "emacs.desktop" ]; - "application/epub+zip" = [ "emacs.desktop" ]; - "application/oxps" = [ "emacs.desktop" ]; - "image/jpeg" = [ "swayimg.desktop" ]; - "image/png" = [ "swayimg.desktop" ]; - "video/mp4" = [ "mpv.desktop" ]; - "text/csv" = [ "emacs.desktop" ]; - "text/html" = [ "firefox.desktop" ]; - "x-scheme-handler/http" = [ "firefox.desktop" ]; - "x-scheme-handler/https" = [ "firefox.desktop" ]; - "x-scheme-handler/about" = [ "firefox.desktop" ]; - "x-scheme-handler/chrome" = [ "firefox.desktop" ]; - "application/x-extension-htm" = [ "firefox.desktop" ]; - "application/x-extension-html" = [ "firefox.desktop" ]; - "application/x-extension-shtml" = [ "firefox.desktop" ]; - "application/xhtml+xml" = [ "firefox.desktop" ]; - "application/x-extension-xhtml" = [ "firefox.desktop" ]; - "application/x-extension-xht" = [ "firefox.desktop" ]; - "application/x-mozilla-bookmarks" = [ "firefox.desktop" ]; - "x-scheme-handler/msteams" = [ "teams-for-linux.desktop" ]; - "x-scheme-handler/zoomus" = [ ]; - }; - associations.added = defaultApplications; - }; }; } diff --git a/system/desktop.nix b/system/desktop.nix index 37fc8653..98f51803 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -10,11 +10,8 @@ polkit.enable = true; rtkit.enable = true; }; - sound.enable = true; - hardware = { - pulseaudio.enable = false; - bluetooth.enable = true; - }; + sound.enable = false; + hardware.bluetooth.enable = true; services = { accounts-daemon.enable = true; dbus.packages = with pkgs; [ gcr ]; @@ -24,9 +21,14 @@ }; pipewire = { enable = true; - alsa.enable = true; - alsa.support32Bit = true; + alsa = { + enable = true; + support32Bit = true; + }; + audio.enable = true; + jack.enable = true; pulse.enable = true; + wireplumber.enable = true; }; xserver = { layout = "gb"; @@ -41,4 +43,8 @@ platformTheme = "gnome"; style = "adwaita-dark"; }; + xdg.portal = { + enable = true; + xdgOpenUsePortal = true; + }; } diff --git a/system/hyprland.nix b/system/hyprland.nix index c13c7aab..ff60178f 100644 --- a/system/hyprland.nix +++ b/system/hyprland.nix @@ -38,11 +38,6 @@ libreoffice webcord teams-for-linux - gst_all_1.gst-libav - gst_all_1.gst-plugins-base - gst_all_1.gst-plugins-good - gst_all_1.gst-plugins-bad - gst_all_1.gst-plugins-ugly ]; }; security.pam.services.swaylock = { }; @@ -58,7 +53,32 @@ initial_session = { inherit command; }; }; }; - xdg.portal.enable = true; + xdg.mime = rec { + enable = true; + defaultApplications = { + "application/pdf" = [ "emacs.desktop" ]; + "application/epub+zip" = [ "emacs.desktop" ]; + "application/oxps" = [ "emacs.desktop" ]; + "image/jpeg" = [ "swayimg.desktop" ]; + "image/png" = [ "swayimg.desktop" ]; + "video/mp4" = [ "mpv.desktop" ]; + "text/csv" = [ "emacs.desktop" ]; + "text/html" = [ "firefox.desktop" ]; + "x-scheme-handler/http" = [ "firefox.desktop" ]; + "x-scheme-handler/https" = [ "firefox.desktop" ]; + "x-scheme-handler/about" = [ "firefox.desktop" ]; + "x-scheme-handler/chrome" = [ "firefox.desktop" ]; + "application/x-extension-htm" = [ "firefox.desktop" ]; + "application/x-extension-html" = [ "firefox.desktop" ]; + "application/x-extension-shtml" = [ "firefox.desktop" ]; + "application/xhtml+xml" = [ "firefox.desktop" ]; + "application/x-extension-xhtml" = [ "firefox.desktop" ]; + "application/x-extension-xht" = [ "firefox.desktop" ]; + "application/x-mozilla-bookmarks" = [ "firefox.desktop" ]; + "x-scheme-handler/msteams" = [ "teams-for-linux.desktop" ]; + }; + addedAssociations = defaultApplications; + }; programs = { dconf.enable = true; light.enable = true; From 9d8adcdb7a937d96a48a11cdf40dbc7f10ad659c Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 23 Jan 2024 20:13:38 +0000 Subject: [PATCH 4/4] Add libcamera to desktop.nix --- system/desktop.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/system/desktop.nix b/system/desktop.nix index 98f51803..acf846eb 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -3,6 +3,7 @@ environment.systemPackages = with pkgs; [ dex libnotify + libcamera glib gsettings-desktop-schemas ];