bin
This commit is contained in:
parent
9f260c9a73
commit
703e059221
|
|
@ -1,26 +1,27 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
deps = {
|
|
||||||
bell = [pkgs.pipewire pkgs.libnotify];
|
|
||||||
nsxiv-rifle = [pkgs.nsxiv];
|
|
||||||
screenshot = [pkgs.maim pkgs.xclip];
|
|
||||||
};
|
|
||||||
ln = config.u.lib.ln "${config.u.confPath}/user/bin";
|
ln = config.u.lib.ln "${config.u.confPath}/user/bin";
|
||||||
in {
|
in {
|
||||||
|
u.bin = with pkgs; {
|
||||||
|
edit = [];
|
||||||
|
sh-tmux = [tmux];
|
||||||
|
sm = [];
|
||||||
|
} // lib.optionalAttrs config.u.has.graphical {
|
||||||
|
bell = [pipewire libnotify];
|
||||||
|
nsxiv-rifle = [nsxiv];
|
||||||
|
screenshot = [maim xclip];
|
||||||
|
};
|
||||||
home.file = builtins.listToAttrs (
|
home.file = builtins.listToAttrs (
|
||||||
map
|
map
|
||||||
(x: {
|
(x: {
|
||||||
name = ".local/bin/${x}";
|
name = ".local/bin/${x}";
|
||||||
value = {source = ln x;};
|
value = {source = ln x;};
|
||||||
})
|
})
|
||||||
(
|
(builtins.attrNames config.u.bin)
|
||||||
builtins.filter
|
|
||||||
(x: x != "default.nix")
|
|
||||||
(builtins.attrNames (builtins.readDir ./.))
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
home.packages = pkgs.lib.lists.flatten (builtins.attrValues deps);
|
home.packages = pkgs.lib.lists.flatten (builtins.attrValues config.u.bin);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,10 @@
|
||||||
default = "";
|
default = "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
bin = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.listOf lib.types.package);
|
||||||
|
description = "scripts to put in .local/bin and their dependencies";
|
||||||
|
};
|
||||||
bookmarks = lib.mkOption {
|
bookmarks = lib.mkOption {
|
||||||
type = lib.types.listOf (lib.types.submodule {
|
type = lib.types.listOf (lib.types.submodule {
|
||||||
options = {
|
options = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue