feat: anyrun as flake

This commit is contained in:
Ahurac 2024-10-08 10:10:30 +02:00
parent 3ab6605d48
commit 2d50d11150
3 changed files with 122 additions and 9 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, inputs, ... }:
{
home.username = "ahurac";
@ -12,7 +12,6 @@
wl-clipboard
swayosd
prismlauncher
anyrun
noto-fonts
libreoffice
mosh
@ -370,4 +369,51 @@
};
};
};
programs.anyrun = {
enable = true;
# package = pkgs.anyrun;
config = {
plugins = [ inputs.anyrun.packages.${pkgs.system}.applications ];
x.fraction = 0.5;
y.absolute = 0;
width.absolute = 800;
height.absolute = 0;
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = false;
closeOnClick = false;
showResultsImmediately = false;
maxEntries = null;
};
extraCss = ''
#window {
background-color: rgba(0, 0, 0, 0);
}
box#main {
border-radius: 10px;
background-color: @theme_bg_color;
margin-top: 20px;
}
list#main {
background-color: rgba(0, 0, 0, 0);
border-radius: 10px;
}
list#plugin {
background-color: rgba(0, 0, 0, 0);
}
label#match-desc {
font-size: 10px;
}
label#plugin {
font-size: 14px;
}
'';
};
}

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"
}
},
"flatpaks": {
"locked": {
"lastModified": 1721549352,
@ -55,10 +98,26 @@
},
"root": {
"inputs": {
"anyrun": "anyrun",
"flatpaks": "flatpaks",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
},
"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

@ -6,9 +6,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
flatpaks.url = "github:gmodena/nix-flatpak/main";
anyrun.url = "github:anyrun-org/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, flatpaks, ... }@inputs: {
outputs = { self, nixpkgs, home-manager, flatpaks, anyrun, ... }@inputs: {
nixosConfigurations.ahrc-pc = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
@ -17,9 +19,12 @@
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs.flake-inputs = inputs;
home-manager.users.ahurac.imports =
[ flatpaks.homeManagerModules.nix-flatpak ./ahrc-pc/home.nix ];
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.ahurac.imports = [
flatpaks.homeManagerModules.nix-flatpak
anyrun.homeManagerModules.default
./ahrc-pc/home.nix
];
}
];
};
@ -32,9 +37,12 @@
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs.flake-inputs = inputs;
home-manager.users.ahurac.imports =
[ flatpaks.homeManagerModules.nix-flatpak ./ahrc-laptop/home.nix ];
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.ahurac.imports = [
flatpaks.homeManagerModules.nix-flatpak
anyrun.homeManagerModules.default
./ahrc-laptop/home.nix
];
}
];
};