feat(audit): address batch 1 of missing scripts and enable fwupd
- Move 18 Hyprland/desktop scripts from features/desktop/scripts/ to packaged directories - Add nomarchy.hardware.fwupd option (default false) and enable service - Implement nomarchy-update-firmware wrapper for fwupdmgr - Add hyprland, swayosd, and fwupd to nomarchy-system-scripts dependencies - Update docs/SCRIPTS.md with 'kept' status for ported scripts
This commit is contained in:
@@ -10,9 +10,18 @@ in
|
||||
isT2Mac = mkEnableOption "Apple T2 MacBook specific hardware fixes";
|
||||
isFramework = mkEnableOption "Framework laptop specific hardware fixes";
|
||||
hasIPU7Camera = mkEnableOption "Intel IPU7 camera support";
|
||||
fwupd = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Whether to enable fwupd firmware update service.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.fwupd {
|
||||
services.fwupd.enable = true;
|
||||
})
|
||||
|
||||
(mkIf cfg.isXPS {
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="pci", KERNEL=="0000:00:19.0", ATTR{power/control}="on"
|
||||
|
||||
@@ -30,6 +30,9 @@ let
|
||||
bc
|
||||
supergfxctl
|
||||
systemd
|
||||
fwupd
|
||||
hyprland
|
||||
swayosd
|
||||
];
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
|
||||
15
core/system/scripts/nomarchy-swayosd-brightness
Executable file
15
core/system/scripts/nomarchy-swayosd-brightness
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Display brightness level using SwayOSD on the current monitor.
|
||||
# Usage: nomarchy-swayosd-brightness <percent>
|
||||
|
||||
percent="$1"
|
||||
|
||||
progress="$(awk -v p="$percent" 'BEGIN{printf "%.2f", p/100}')"
|
||||
[[ $progress == "0.00" ]] && progress="0.01"
|
||||
|
||||
swayosd-client \
|
||||
--monitor "$(hyprctl monitors -j | jq -r '.[]|select(.focused==true).name')" \
|
||||
--custom-icon display-brightness \
|
||||
--custom-progress "$progress" \
|
||||
--custom-progress-text "${percent}%"
|
||||
15
core/system/scripts/nomarchy-swayosd-kbd-brightness
Executable file
15
core/system/scripts/nomarchy-swayosd-kbd-brightness
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Display keyboard brightness level using SwayOSD on the current monitor.
|
||||
# Usage: nomarchy-swayosd-kbd-brightness <percent>
|
||||
|
||||
percent="$1"
|
||||
|
||||
progress="$(awk -v p="$percent" 'BEGIN{printf "%.2f", p/100}')"
|
||||
[[ $progress == "0.00" ]] && progress="0.01"
|
||||
|
||||
swayosd-client \
|
||||
--monitor "$(hyprctl monitors -j | jq -r '.[]|select(.focused==true).name')" \
|
||||
--custom-icon keyboard-brightness \
|
||||
--custom-progress "$progress" \
|
||||
--custom-progress-text "${percent}%"
|
||||
Reference in New Issue
Block a user