bringing back hyprland
This commit is contained in:
1 parent
aa41228d27
commit
9d9a890877
43 files changed
+976
-1036
No files matched your search
@@ -18,7 +18,8 @@ desktop/
|
||||
├── printers.nix # CUPS printing + drivers (always on when desktop enabled)
|
||||
├── gnome.nix # skyg.nixos.desktop.gnome — GNOME + pop-shell
|
||||
├── kde.nix # skyg.nixos.desktop.kde — Plasma 6
|
||||
└── cosmic.nix # skyg.nixos.desktop.cosmic — COSMIC DE
|
||||
├── cosmic.nix # skyg.nixos.desktop.cosmic — COSMIC DE
|
||||
└── fixes/ # skyg.nixos.desktop.fixes — workaround and fixes (e.g., AirPods audio)
|
||||
```
|
||||
|
||||
## How it composes
|
||||
@@ -41,6 +42,7 @@ skyg.nixos.desktop.tiler.* → tiler/
|
||||
skyg.nixos.desktop.stylix.enable → stylix/ (default true)
|
||||
skyg.nixos.desktop.crypto.enable → crypto.nix
|
||||
skyg.nixos.desktop.x11.* → x11/
|
||||
skyg.nixos.desktop.fixes.* → fixes/
|
||||
```
|
||||
|
||||
## Conventions
|
||||
|
||||
@@ -19,6 +19,7 @@ in
|
||||
./tiler
|
||||
./stylix
|
||||
./printers.nix
|
||||
./fixes
|
||||
];
|
||||
|
||||
options = {
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# modules/nixos/desktop/fixes/
|
||||
|
||||
Various workarounds and fixes for desktop/workstation issues.
|
||||
|
||||
## Files
|
||||
|
||||
```
|
||||
fixes/
|
||||
└── default.nix # skyg.nixos.desktop.fixes.airpod-bluetooth.enabled — AirPods distorted/robotic audio fix
|
||||
```
|
||||
|
||||
## Behaviour
|
||||
|
||||
### AirPods Bluetooth Audio Fix
|
||||
When `skyg.nixos.desktop.fixes.airpod-bluetooth.enabled` is set to `true`:
|
||||
- WirePlumber's auto-switching behavior is disabled for the AirPods.
|
||||
- Prevents switching from high-quality A2DP profile to low-quality HFP/HSP mono profile when a mic stream opens.
|
||||
- Dictates that AirPods stay in A2DP permanently, while meeting/chat apps fall back to the laptop's built-in mic for input.
|
||||
@@ -0,0 +1,31 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.skyg.nixos.desktop.fixes.airpod-bluetooth;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
skyg.nixos.desktop.fixes.airpod-bluetooth = {
|
||||
enabled = lib.mkEnableOption "Fix robotic/distorted audio with AirPods over Bluetooth";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (cfg.enabled && config.skyg.nixos.desktop.enable) {
|
||||
# Fix robotic/distorted audio with AirPods over Bluetooth.
|
||||
# WirePlumber 0.5 (nixpkgs 26.05+) auto-switches BT devices from A2DP to
|
||||
# HFP whenever any app opens a mic stream (Chromium, Slack, etc.), which
|
||||
# degrades both speaker and mic quality to 8 kHz CVSD/mSBC and causes the
|
||||
# robotic sound. Disabling auto-switch keeps AirPods in A2DP permanently;
|
||||
# meeting apps fall back to the laptop's built-in mic for input.
|
||||
services.pipewire.wireplumber.extraConfig = {
|
||||
"51-airpods-bluetooth" = {
|
||||
"monitor.bluez.properties" = {
|
||||
"bluez5.msbc-support" = false;
|
||||
"bluez5.hfphsp-backend" = "native";
|
||||
};
|
||||
"wireplumber.settings" = {
|
||||
"bluetooth.autoswitch-to-headset-profile" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -11,7 +11,7 @@ tiler/
|
||||
├── default.nix # skyg.nixos.desktop.tiler.enable — DMS, keyring, polkit, shared packages
|
||||
├── niri.nix # skyg.nixos.desktop.tiler.niri — niri compositor (sets tiler.enable)
|
||||
├── niri-touchscreen-gestures.nix # skyg.nixos.desktop.tiler.niri.touchscreen-gestures — touchscreen swipe support
|
||||
├── hyprland.nix # skyg.nixos.desktop.tiler.hyprland — Hyprland (sets tiler.enable)
|
||||
├── hyprland.nix # skyg.nixos.desktop.tiler.hyprland — Hyprland via flake (sets tiler.enable)
|
||||
└── swww.nix # skyg.nixos.desktop.tiler.background — swww/waypaper wallpaper tools
|
||||
```
|
||||
|
||||
@@ -19,6 +19,7 @@ tiler/
|
||||
|
||||
- Enabling either `niri` or `hyprland` sets `skyg.nixos.desktop.tiler.enable = true`, which
|
||||
pulls in the shared substrate. You normally enable only the compositor option.
|
||||
- Both compositors can be enabled at once (pick the session at the greeter).
|
||||
- The shared substrate configures **gnome-keyring as the SSH agent** (so
|
||||
`programs.ssh.startAgent = false`), enables polkit, and installs control tools
|
||||
(pavucontrol, playerctl, brightnessctl, blueman) and screen-capture tools
|
||||
@@ -32,9 +33,32 @@ skyg.nixos.desktop.tiler.enable → default.nix (usually set in
|
||||
skyg.nixos.desktop.tiler.niri.enable
|
||||
skyg.nixos.desktop.tiler.niri.touchscreen-gestures.enable # 3/4-finger swipes → niri actions
|
||||
skyg.nixos.desktop.tiler.hyprland.enable
|
||||
skyg.nixos.desktop.tiler.hyprland.configName # per-host config dir (default: hostName)
|
||||
skyg.nixos.desktop.tiler.background.enable
|
||||
```
|
||||
|
||||
## Hyprland
|
||||
|
||||
`hyprland.nix` runs the latest Hyprland from the `hyprland` flake input (package +
|
||||
`xdg-desktop-portal-hyprland` kept in sync), launched via UWSM. It:
|
||||
|
||||
- Installs the noctalia shell and autostart-friendly tools (grim/slurp/satty,
|
||||
wofi/rofi, hypridle). There is no waybar/hyprpanel — the shell is noctalia.
|
||||
- Symlinks `~/.config/hypr` -> `configs/<configName>/hypr`, where `configName`
|
||||
defaults to `config.skyg.core.hostName` (so `fwbook` -> `configs/fwbook/hypr`).
|
||||
|
||||
The Hyprland Cachix cache (`hyprland.cachix.org`) is added in
|
||||
`modules/core/nix-substituters.nix` so the flake build doesn't compile from source.
|
||||
|
||||
### No overview plugin
|
||||
|
||||
We intentionally do not ship an overview plugin. hyprexpo was dropped from the
|
||||
official `hyprland-plugins` repo in 2026, and the maintained community fork
|
||||
(`sandwichfarm/hyprexpo`) chases Hyprland `main` and fails to build against
|
||||
tagged releases — it's a moving target. `Mod+Tab` falls back to `cyclenext`
|
||||
instead of niri's `toggle-overview`. Revisit if a plugin lands in nixpkgs
|
||||
kept in sync with the packaged Hyprland.
|
||||
|
||||
## Conventions
|
||||
|
||||
- Don't set `tiler.enable` directly — enable a compositor and let it flip the shared switch.
|
||||
|
||||
@@ -1,46 +1,67 @@
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, skygUtils
|
||||
, hyprland
|
||||
, noctalia
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.skyg.nixos.desktop.tiler.hyprland;
|
||||
# hypr-plugin-dir = pkgs.symlinkJoin {
|
||||
# name = "hyrpland-plugins";
|
||||
# paths = with pkgs.hyprlandPlugins; [
|
||||
# hyprexpo
|
||||
# hyprbars
|
||||
# hyprspace
|
||||
# ];
|
||||
# };
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
hyprlandPkg = hyprland.packages.${system}.hyprland;
|
||||
hyprlandPortal = hyprland.packages.${system}.xdg-desktop-portal-hyprland;
|
||||
noctaliaPkg = noctalia.packages.${system}.default;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
skyg.nixos.desktop.tiler.hyprland = {
|
||||
enable = lib.mkEnableOption "hyprland";
|
||||
configName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = config.skyg.core.hostName;
|
||||
description = ''
|
||||
Name of the per-host Hyprland config directory under `configs/`.
|
||||
The module symlinks `~/.config/hypr` -> `configs/<configName>/hypr`.
|
||||
Defaults to the machine's hostName (e.g. `fwbook` -> `configs/fwbook/hypr`).
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
skyg.nixos.desktop.tiler.enable = true;
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
xwayland.enable = true;
|
||||
package = hyprlandPkg;
|
||||
portalPackage = hyprlandPortal;
|
||||
};
|
||||
programs.uwsm.enable = true;
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# hyprls
|
||||
# ];
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ];
|
||||
extraPortals = [ hyprlandPortal ];
|
||||
};
|
||||
|
||||
# Shell + tools that the Hyprland session/config expect.
|
||||
environment.systemPackages = with pkgs; [
|
||||
noctaliaPkg
|
||||
hypridle
|
||||
wofi
|
||||
rofi
|
||||
wl-clipboard
|
||||
grim
|
||||
slurp
|
||||
satty
|
||||
];
|
||||
|
||||
# Symlink ~/.config/hypr -> configs/<configName>/hypr (host-specific).
|
||||
system.userActivationScripts.hyprlandConfig.text = skygUtils.makeHyperlinkScriptToConfigs {
|
||||
filePath = "${cfg.configName}/hypr";
|
||||
targetPath = "hypr";
|
||||
configSource = "/home/${config.skyg.user.name}/nixos-setup/configs";
|
||||
};
|
||||
# home-manager.users."${config.skyg.user.name}".wayland.windowManager.hyprland = {
|
||||
# enable = true;
|
||||
# plugins = with pkgs; [
|
||||
# hyprlandPlugins.hyprexpo
|
||||
# hyprlandPlugins.hyprbars
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user