add extraSpecialArgs to use flake inputs in home.nix and add anyrun as a launcher

This commit is contained in:
Gabriella Bere 2024-08-23 13:15:06 +01:00
parent 60495f0f31
commit e1d94eefba
4 changed files with 101 additions and 2 deletions

59
flake.lock generated
View file

@ -1,5 +1,48 @@
{
"nodes": {
"anyrun": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1721135360,
"narHash": "sha256-ZhSA0e45UxiOAjEVqkym/aULh0Dt+KHJLNda7bjx9UI=",
"owner": "anyrun-org",
"repo": "anyrun",
"rev": "c6101a31a80b51e32e96f6a77616b609770172e0",
"type": "github"
},
"original": {
"owner": "anyrun-org",
"repo": "anyrun",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"anyrun",
"nixpkgs"
]
},
"locked": {
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -38,6 +81,7 @@
},
"root": {
"inputs": {
"anyrun": "anyrun",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"stablepkgs": "stablepkgs"
@ -58,6 +102,21 @@
"repo": "nixpkgs",
"type": "github"
}
},
"systems": {
"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"
}
}
},
"root": "root",

View file

@ -11,6 +11,10 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
anyrun = {
url = "github:anyrun-org/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, stablepkgs, home-manager, ... } @ inputs:
@ -28,6 +32,7 @@
./modules/nh.nix
./modules/environment.nix
./modules/waydroid.nix
home-manager.nixosModules.default
];
};
};

View file

@ -236,5 +236,41 @@
];
};
};
programs.anyrun = {
enable = true;
config = {
plugins = [
# An array of all the plugins you want, which either can be paths to the .so files, or their packages
inputs.anyrun.packages.${pkgs.system}.applications
# ./some_plugin.so
# "${inputs.anyrun.packages.${pkgs.system}.anyrun-with-all-plugins}/lib/kidex"
];
x = { fraction = 0.5; };
y = { fraction = 0.3; };
width = { fraction = 0.3; };
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = false;
closeOnClick = false;
showResultsImmediately = false;
maxEntries = null;
};
extraCss = ''
.some_class {
background: red;
}
'';
extraConfigFiles."some-plugin.ron".text = ''
Config(
// for any other plugin
// this file will be put in ~/.config/anyrun/some-plugin.ron
// refer to docs of xdg.configFile for available options
)
'';
};
services.blueman-applet.enable = true;
}

View file

@ -9,7 +9,6 @@
imports =
[
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
];
# Bootloader.
@ -107,7 +106,7 @@
};
home-manager = {
# extraSpeicalArgs = { inherit inputs; };
extraSpeicalArgs = { inherit inputs; };
users = {
"blue" = import ../../home-manager/home.nix;
};