anyrun: switch to upstream flake for working daemon mode
Replace nixpkgs anyrun with the upstream anyrun-org/anyrun flake, which provides its own HM module and plugin packages. The nixpkgs build had a broken daemon (GTK activate crash). Re-enable daemon startup and close/open toggle. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
402f2f36f5
commit
9f2a5a2868
3 changed files with 113 additions and 11 deletions
91
flake.lock
generated
91
flake.lock
generated
|
|
@ -1,5 +1,49 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"anyrun": {
|
||||||
|
"inputs": {
|
||||||
|
"anyrun-provider": "anyrun-provider",
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1778513621,
|
||||||
|
"narHash": "sha256-zo+sQJQ1eqZdoEtIsdxRnchpxQMgK022UnWZdSq6NRw=",
|
||||||
|
"owner": "anyrun-org",
|
||||||
|
"repo": "anyrun",
|
||||||
|
"rev": "a338930f02ab4627cead5105b3d1fbce5a370aa8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "anyrun-org",
|
||||||
|
"repo": "anyrun",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"anyrun-provider": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"anyrun",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1764705714,
|
||||||
|
"narHash": "sha256-4rN2vWicM6Pn6eTo3Nu7IB5isbkc9u4arNMnY2+S8iM=",
|
||||||
|
"owner": "anyrun-org",
|
||||||
|
"repo": "anyrun-provider",
|
||||||
|
"rev": "88a786e6029733a4c02c2c6b1024f65029b0b9cf",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "anyrun-org",
|
||||||
|
"repo": "anyrun-provider",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"aquamarine": {
|
"aquamarine": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"hyprutils": [
|
"hyprutils": [
|
||||||
|
|
@ -182,6 +226,27 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"anyrun",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1763759067,
|
||||||
|
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
|
|
@ -199,7 +264,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_2": {
|
"flake-parts_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"stylix",
|
"stylix",
|
||||||
|
|
@ -387,7 +452,7 @@
|
||||||
"hyprwire": "hyprwire",
|
"hyprwire": "hyprwire",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"pre-commit-hooks": "pre-commit-hooks",
|
"pre-commit-hooks": "pre-commit-hooks",
|
||||||
"systems": "systems",
|
"systems": "systems_2",
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -640,7 +705,7 @@
|
||||||
"cachyos-kernel": "cachyos-kernel",
|
"cachyos-kernel": "cachyos-kernel",
|
||||||
"cachyos-kernel-patches": "cachyos-kernel-patches",
|
"cachyos-kernel-patches": "cachyos-kernel-patches",
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts_2",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -837,6 +902,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"anyrun": "anyrun",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"home-manager-stable": "home-manager-stable",
|
"home-manager-stable": "home-manager-stable",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
|
|
@ -855,11 +921,11 @@
|
||||||
"base16-helix": "base16-helix",
|
"base16-helix": "base16-helix",
|
||||||
"base16-vim": "base16-vim",
|
"base16-vim": "base16-vim",
|
||||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_3",
|
||||||
"gnome-shell": "gnome-shell",
|
"gnome-shell": "gnome-shell",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"systems": "systems_2",
|
"systems": "systems_3",
|
||||||
"tinted-kitty": "tinted-kitty",
|
"tinted-kitty": "tinted-kitty",
|
||||||
"tinted-schemes": "tinted-schemes",
|
"tinted-schemes": "tinted-schemes",
|
||||||
"tinted-tmux": "tinted-tmux",
|
"tinted-tmux": "tinted-tmux",
|
||||||
|
|
@ -895,6 +961,21 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_2": {
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689347949,
|
||||||
|
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default-linux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,11 @@
|
||||||
# upstream needs newer stdenv than 25.11 ships.
|
# upstream needs newer stdenv than 25.11 ships.
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
|
||||||
|
anyrun = {
|
||||||
|
url = "github:anyrun-org/anyrun";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
stylix.url = "github:nix-community/stylix";
|
stylix.url = "github:nix-community/stylix";
|
||||||
};
|
};
|
||||||
outputs =
|
outputs =
|
||||||
|
|
@ -44,6 +49,7 @@
|
||||||
, zen-browser
|
, zen-browser
|
||||||
, nix-cachyos-kernel
|
, nix-cachyos-kernel
|
||||||
, hyprland
|
, hyprland
|
||||||
|
, anyrun
|
||||||
, stylix
|
, stylix
|
||||||
, proton-cachyos-nix
|
, proton-cachyos-nix
|
||||||
, ...
|
, ...
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
let
|
let
|
||||||
hyprland-pkgs = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system};
|
hyprland-pkgs = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
|
anyrun-pkgs = inputs.anyrun.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
|
|
||||||
isMacbook = config.networking.hostName == "FredOS-Macbook";
|
isMacbook = config.networking.hostName == "FredOS-Macbook";
|
||||||
isGaming = !isMacbook;
|
isGaming = !isMacbook;
|
||||||
|
|
@ -94,6 +95,15 @@ in
|
||||||
polkit_gnome
|
polkit_gnome
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Use upstream anyrun flake's HM module instead of the built-in one
|
||||||
|
# for working daemon mode.
|
||||||
|
home-manager.sharedModules = [
|
||||||
|
({ modulesPath, ... }: {
|
||||||
|
disabledModules = [ "${modulesPath}/programs/anyrun.nix" ];
|
||||||
|
})
|
||||||
|
inputs.anyrun.homeManagerModules.default
|
||||||
|
];
|
||||||
|
|
||||||
home-manager.users.fred = { config, lib, pkgs, inputs, ... }:
|
home-manager.users.fred = { config, lib, pkgs, inputs, ... }:
|
||||||
let
|
let
|
||||||
c = config.lib.stylix.colors;
|
c = config.lib.stylix.colors;
|
||||||
|
|
@ -201,16 +211,20 @@ in
|
||||||
extraConfig =
|
extraConfig =
|
||||||
let
|
let
|
||||||
powerMenu = pkgs.writeShellScript "power-menu" ''
|
powerMenu = pkgs.writeShellScript "power-menu" ''
|
||||||
|
# Standalone stdin mode conflicts with the daemon.
|
||||||
|
${anyrun-pkgs.anyrun}/bin/anyrun quit 2>/dev/null || true
|
||||||
choice=$(printf '%s\n' \
|
choice=$(printf '%s\n' \
|
||||||
$'\uf023 Lock' \
|
$'\uf023 Lock' \
|
||||||
$'\uf08b Logout' \
|
$'\uf08b Logout' \
|
||||||
$'\uf01e Reboot' \
|
$'\uf01e Reboot' \
|
||||||
$'\uf011 Shutdown' \
|
$'\uf011 Shutdown' \
|
||||||
| ${pkgs.anyrun}/bin/anyrun \
|
| ${anyrun-pkgs.anyrun}/bin/anyrun \
|
||||||
--plugins "${pkgs.anyrun}/lib/libstdin.so" \
|
--plugins "${anyrun-pkgs.stdin}/lib/libstdin.so" \
|
||||||
--show-results-immediately true \
|
--show-results-immediately true \
|
||||||
--hide-plugin-info true \
|
--hide-plugin-info true \
|
||||||
--close-on-click true)
|
--close-on-click true)
|
||||||
|
# Restart the daemon.
|
||||||
|
${anyrun-pkgs.anyrun}/bin/anyrun daemon &
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
*Lock) ${pkgs.hyprlock}/bin/hyprlock ;;
|
*Lock) ${pkgs.hyprlock}/bin/hyprlock ;;
|
||||||
*Logout) hyprctl dispatch exit ;;
|
*Logout) hyprctl dispatch exit ;;
|
||||||
|
|
@ -261,6 +275,7 @@ in
|
||||||
hl.exec_cmd("wl-paste --type image --watch cliphist store")
|
hl.exec_cmd("wl-paste --type image --watch cliphist store")
|
||||||
hl.exec_cmd("hyprctl setcursor Bibata-Modern-Ice 24")
|
hl.exec_cmd("hyprctl setcursor Bibata-Modern-Ice 24")
|
||||||
hl.exec_cmd("swayosd-server")
|
hl.exec_cmd("swayosd-server")
|
||||||
|
hl.exec_cmd("anyrun daemon")
|
||||||
${lib.optionalString isMacbook ''hl.exec_cmd("hypridle")''}
|
${lib.optionalString isMacbook ''hl.exec_cmd("hypridle")''}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
@ -286,7 +301,7 @@ in
|
||||||
-- Apps
|
-- Apps
|
||||||
hl.bind(mod .. " + T", hl.dsp.exec_cmd("ghostty"))
|
hl.bind(mod .. " + T", hl.dsp.exec_cmd("ghostty"))
|
||||||
hl.bind(mod .. " + E", hl.dsp.exec_cmd("nemo"))
|
hl.bind(mod .. " + E", hl.dsp.exec_cmd("nemo"))
|
||||||
hl.bind(mod .. " + R", hl.dsp.exec_cmd("killall anyrun || anyrun"))
|
hl.bind(mod .. " + R", hl.dsp.exec_cmd("anyrun close || anyrun"))
|
||||||
hl.bind(mod .. " + Q", hl.dsp.window.close())
|
hl.bind(mod .. " + Q", hl.dsp.window.close())
|
||||||
hl.bind(mod .. " + SHIFT + E", hl.dsp.exit())
|
hl.bind(mod .. " + SHIFT + E", hl.dsp.exit())
|
||||||
|
|
||||||
|
|
@ -305,8 +320,8 @@ in
|
||||||
hl.bind(mod .. " + K", hl.dsp.focus({ direction = "up" }))
|
hl.bind(mod .. " + K", hl.dsp.focus({ direction = "up" }))
|
||||||
hl.bind(mod .. " + J", hl.dsp.focus({ direction = "down" }))
|
hl.bind(mod .. " + J", hl.dsp.focus({ direction = "down" }))
|
||||||
|
|
||||||
-- Power menu — toggle: kills anyrun if already open
|
-- Power menu — dismiss launcher if open, then show menu
|
||||||
hl.bind(mod .. " + L", hl.dsp.exec_cmd("killall anyrun || ${powerMenu}"))
|
hl.bind(mod .. " + L", hl.dsp.exec_cmd("anyrun close 2>/dev/null; ${powerMenu}"))
|
||||||
|
|
||||||
-- Move windows
|
-- Move windows
|
||||||
hl.bind(mod .. " + SHIFT + left", hl.dsp.window.move({ direction = "left" }))
|
hl.bind(mod .. " + SHIFT + left", hl.dsp.window.move({ direction = "left" }))
|
||||||
|
|
@ -372,7 +387,7 @@ in
|
||||||
programs.anyrun = {
|
programs.anyrun = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
plugins = [ "${pkgs.anyrun}/lib/libapplications.so" ];
|
plugins = [ "${anyrun-pkgs.applications}/lib/libapplications.so" ];
|
||||||
x.fraction = 0.5;
|
x.fraction = 0.5;
|
||||||
y.fraction = 0.25;
|
y.fraction = 0.25;
|
||||||
width.absolute = 350;
|
width.absolute = 350;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue