repositories

NixDaemon

NixOS pentest workstation as one flake — IceBreaker's successor

clonegit clone https://git.daemon-sec.xyz/NixDaemon.git
caelestia.luaLua56 lines3.8 KiBraw download
-- caelestia.lua — shortcuts/caelestia.lua from the vault, adapted:
--   * the ~/.local/state/caelestia-mode/enabled gate is gone: Caelestia is the
--     only shell here, so these keys are always live;
--   * `qs -p … ipc call` became `caelestia shell <target> <fn> …`;
--   * this shell version has no audio raise/lower IPC and no per-panel toggle,
--     so volume goes through wpctl (the OSD still reacts) and the Wi-Fi /
--     Bluetooth / Audio / Battery panels open the sidebar, where they live now;
--   * the Omarchy root menu does not exist on NixOS.
local SHELL = "caelestia shell "

-- Rebind a key the stock binds already use: unbind first, then bind.
local function take(keys, description, command, options)
  hl.unbind(keys)
  o.bind(keys, description, command, options)
end

-- ── Drawers ──────────────────────────────────────────────────────────────────
take("SUPER + SPACE", "Caelestia launcher", hl.dsp.global("caelestia:launcher"))
take("SUPER + SHIFT + SPACE", "Omarchy menu", "omarchy-not-ported 'Omarchy menu' 'the Omarchy root menu'")
take("SUPER + ESCAPE", "Caelestia session menu", hl.dsp.global("caelestia:session"))
o.bind("SUPER + D", "Caelestia dashboard", hl.dsp.global("caelestia:dashboard"))
o.bind("SUPER + A", "Caelestia sidebar", hl.dsp.global("caelestia:sidebar"))
o.bind("SUPER + U", "Caelestia utilities", hl.dsp.global("caelestia:utilities"))
o.bind("SUPER + I", "Caelestia settings", hl.dsp.global("caelestia:nexus"))

-- ── Panels (replace the Omarchy shell popups on the same keys) ───────────────
take("SUPER + CTRL + W", "Wi-Fi panel", SHELL .. "drawers toggle sidebar")
take("SUPER + CTRL + B", "Bluetooth panel", SHELL .. "drawers toggle sidebar")
take("SUPER + CTRL + A", "Audio panel", SHELL .. "drawers toggle sidebar")
o.bind("SUPER + ALT + B", "Battery panel", SHELL .. "drawers toggle sidebar")

-- ── Notifications ────────────────────────────────────────────────────────────
take("SUPER + COMMA", "Clear notifications", hl.dsp.global("caelestia:clearNotifs"))
take("SUPER + CTRL + COMMA", "Do not disturb", SHELL .. "notifs toggleDnd")

-- ── OSD: volume, brightness, media ───────────────────────────────────────────
local held = { locked = true, repeating = true }
local locked = { locked = true }
take("XF86AudioRaiseVolume", "Volume up", "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+", held)
take("XF86AudioLowerVolume", "Volume down", "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-", held)
take("XF86AudioMute", "Mute", "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", locked)
take("XF86AudioMicMute", "Mute microphone", "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle", locked)
take("XF86MonBrightnessUp", "Brightness up", SHELL .. "brightness set +5%", held)
take("XF86MonBrightnessDown", "Brightness down", SHELL .. "brightness set 5%-", held)
take("XF86AudioPlay", "Play/pause", hl.dsp.global("caelestia:mediaToggle"), locked)
take("XF86AudioPause", "Play/pause", hl.dsp.global("caelestia:mediaToggle"), locked)
take("XF86AudioNext", "Next track", hl.dsp.global("caelestia:mediaNext"), locked)
take("XF86AudioPrev", "Previous track", hl.dsp.global("caelestia:mediaPrev"), locked)

-- ── Look ─────────────────────────────────────────────────────────────────────
-- Frosted glass for the translucent Caelestia layers.
hl.layer_rule({
  match = { namespace = "^caelestia-" },
  blur = true,
  ignore_alpha = 0.82,
})