2024-09-09 00:22:14 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-09-13 01:50:53 +00:00
|
|
|
with lib; let
|
2024-09-09 00:22:14 +00:00
|
|
|
# Use packages from local derivation
|
|
|
|
git = config.home-manager.users.${config.custom.username}.programs.git.package;
|
|
|
|
hyprland =
|
|
|
|
config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.finalPackage;
|
2024-09-14 21:05:34 +00:00
|
|
|
walker = config.home-manager.users.${config.custom.username}.programs.walker.package;
|
2024-09-09 00:22:14 +00:00
|
|
|
wofi = config.home-manager.users.${config.custom.username}.programs.wofi.package;
|
2024-09-13 01:50:53 +00:00
|
|
|
in {
|
|
|
|
config.home-manager.users.${config.custom.username}.home.file = let
|
|
|
|
# Place script.ext in the same directory as this file
|
|
|
|
#?? pkg = (SHELL "NAME" [ DEPENDENCIES ])
|
|
|
|
# https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeShellApplication
|
|
|
|
bash = name: dependencies: {
|
|
|
|
".local/bin/${name}".source =
|
|
|
|
pkgs.writeShellApplication {
|
|
|
|
inherit name;
|
2024-09-15 23:25:10 +00:00
|
|
|
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/261115
|
|
|
|
#// excludeShellChecks = ["SC2154"]; # argc evaluates variables at runtime
|
|
|
|
|
2024-09-13 01:50:53 +00:00
|
|
|
runtimeInputs = dependencies;
|
|
|
|
text = builtins.readFile ./${name}.sh;
|
|
|
|
}
|
|
|
|
+ "/bin/${name}";
|
|
|
|
};
|
2024-09-09 00:22:14 +00:00
|
|
|
|
2024-09-13 01:50:53 +00:00
|
|
|
# https://wiki.nixos.org/wiki/Nix-writers#Python3
|
|
|
|
# Always latest python version in nixpkgs, use writers.makePythonWriter to pin version
|
|
|
|
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/writers/scripts.nix#L605
|
|
|
|
python = name: dependencies: {
|
|
|
|
".local/bin/${name}".source =
|
|
|
|
pkgs.writers.writePython3Bin name {libraries = dependencies;}
|
|
|
|
# Disable linting
|
|
|
|
# https://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html#ignoring-entire-files
|
|
|
|
("# flake8: noqa\n" + builtins.readFile ./${name}.py)
|
|
|
|
+ "/bin/${name}";
|
|
|
|
};
|
|
|
|
in
|
2024-09-09 00:22:14 +00:00
|
|
|
mkIf config.custom.full (
|
|
|
|
with pkgs;
|
2024-09-13 01:50:53 +00:00
|
|
|
mkMerge (
|
|
|
|
[
|
|
|
|
# Bash files with extension .sh
|
|
|
|
(bash "audio" [
|
2024-09-27 19:51:18 +00:00
|
|
|
argc
|
|
|
|
coreutils
|
2024-09-13 01:50:53 +00:00
|
|
|
easyeffects
|
|
|
|
libnotify
|
|
|
|
])
|
|
|
|
(bash "bwm" [
|
|
|
|
bitwarden-cli
|
|
|
|
coreutils
|
|
|
|
jq
|
|
|
|
libnotify
|
|
|
|
wl-clipboard
|
|
|
|
wofi
|
|
|
|
xclip
|
|
|
|
])
|
|
|
|
(bash "calc" [
|
|
|
|
coreutils
|
|
|
|
libnotify
|
|
|
|
libqalculate
|
|
|
|
wl-clipboard
|
|
|
|
wofi
|
|
|
|
xclip
|
|
|
|
])
|
2024-10-17 01:39:20 +00:00
|
|
|
# TODO: Convert to options and disable clipboard.sh
|
|
|
|
# (bash "clipboard" [
|
|
|
|
# cliphist
|
|
|
|
# libnotify
|
|
|
|
# procps
|
|
|
|
# wl-clipboard
|
|
|
|
# wofi
|
|
|
|
# xclip
|
|
|
|
# ])
|
2024-09-13 01:50:53 +00:00
|
|
|
(bash "close" [
|
|
|
|
coreutils
|
|
|
|
hyprland
|
|
|
|
jq
|
|
|
|
libnotify
|
|
|
|
])
|
|
|
|
(bash "fingerprints" [
|
|
|
|
fprintd
|
|
|
|
libnotify
|
|
|
|
])
|
|
|
|
(bash "inhibit" [
|
|
|
|
coreutils
|
|
|
|
libnotify
|
|
|
|
systemd
|
|
|
|
])
|
2024-09-25 20:03:44 +00:00
|
|
|
(bash "launch" [
|
|
|
|
argc
|
|
|
|
coreutils
|
|
|
|
hyprland
|
|
|
|
jq
|
|
|
|
])
|
2024-09-13 01:50:53 +00:00
|
|
|
(bash "left" [
|
2024-09-24 23:24:27 +00:00
|
|
|
argc
|
2024-09-13 01:50:53 +00:00
|
|
|
hyprland
|
|
|
|
jq
|
|
|
|
libnotify
|
|
|
|
])
|
2024-11-06 17:52:43 +00:00
|
|
|
(bash "mark" [
|
|
|
|
coreutils
|
|
|
|
gnugrep
|
|
|
|
libnotify
|
|
|
|
sway
|
|
|
|
])
|
2024-09-14 21:06:18 +00:00
|
|
|
(bash "menu" [
|
2024-11-24 03:20:44 +00:00
|
|
|
argc
|
2024-10-27 19:40:37 +00:00
|
|
|
coreutils
|
|
|
|
hyprland
|
|
|
|
jq
|
2024-09-14 21:06:18 +00:00
|
|
|
networkmanager_dmenu
|
|
|
|
rofi-rbw
|
|
|
|
walker
|
|
|
|
])
|
2024-09-13 01:50:53 +00:00
|
|
|
(bash "minimize" [
|
|
|
|
hyprland
|
|
|
|
jq
|
|
|
|
libnotify
|
|
|
|
])
|
|
|
|
(bash "network" [
|
|
|
|
libnotify
|
|
|
|
networkmanager
|
|
|
|
])
|
2024-09-15 23:25:10 +00:00
|
|
|
(bash "nixos" [
|
|
|
|
argc
|
|
|
|
coreutils
|
|
|
|
git
|
|
|
|
nh
|
|
|
|
nix
|
2024-09-13 01:50:53 +00:00
|
|
|
nixos-rebuild
|
2024-09-15 23:25:10 +00:00
|
|
|
nvd
|
|
|
|
systemd
|
2024-09-13 01:50:53 +00:00
|
|
|
])
|
2024-09-15 23:25:10 +00:00
|
|
|
(bash "power" [
|
2024-09-13 01:50:53 +00:00
|
|
|
libnotify
|
2024-09-15 23:25:10 +00:00
|
|
|
power-profiles-daemon
|
2024-09-13 01:50:53 +00:00
|
|
|
])
|
2024-11-17 19:38:09 +00:00
|
|
|
(bash "remote" [
|
|
|
|
argc
|
|
|
|
coreutils
|
|
|
|
freerdp3
|
|
|
|
iputils
|
|
|
|
libnotify
|
|
|
|
libvirt
|
|
|
|
remmina
|
|
|
|
])
|
2024-11-06 17:52:43 +00:00
|
|
|
(bash "scratchpad" [
|
|
|
|
coreutils
|
|
|
|
libnotify
|
|
|
|
sway
|
|
|
|
])
|
2024-09-13 01:50:53 +00:00
|
|
|
(bash "screenshot" [
|
2024-09-21 12:35:32 +00:00
|
|
|
argc
|
2024-09-13 01:50:53 +00:00
|
|
|
coreutils
|
|
|
|
grimblast
|
|
|
|
imagemagick
|
|
|
|
libnotify
|
|
|
|
swappy
|
|
|
|
])
|
2024-11-06 17:52:43 +00:00
|
|
|
(bash "socket" [
|
|
|
|
coreutils
|
|
|
|
procps
|
|
|
|
])
|
2024-09-13 01:50:53 +00:00
|
|
|
(bash "toggle" [
|
|
|
|
gnugrep
|
|
|
|
hyprland
|
|
|
|
jq
|
|
|
|
libnotify
|
|
|
|
])
|
|
|
|
(bash "vpn" [
|
|
|
|
gnused
|
|
|
|
jq
|
|
|
|
libnotify
|
|
|
|
tailscale
|
|
|
|
])
|
2024-11-06 17:52:43 +00:00
|
|
|
(bash "vrr-fs" [
|
|
|
|
jq
|
|
|
|
libnotify
|
|
|
|
sway
|
|
|
|
])
|
2024-09-13 01:50:53 +00:00
|
|
|
(bash "vrr" [
|
|
|
|
hyprland
|
|
|
|
jq
|
|
|
|
libnotify
|
|
|
|
])
|
|
|
|
(bash "wallpaper" [
|
|
|
|
coreutils
|
|
|
|
fd
|
|
|
|
imagemagick
|
|
|
|
libnotify
|
|
|
|
rsync
|
|
|
|
swww
|
|
|
|
tailscale
|
|
|
|
])
|
2024-09-29 02:36:20 +00:00
|
|
|
(bash "window" [
|
|
|
|
argc
|
2024-09-29 18:42:11 +00:00
|
|
|
coreutils
|
2024-09-29 02:36:20 +00:00
|
|
|
hyprland
|
|
|
|
jq
|
|
|
|
])
|
2024-11-06 17:52:43 +00:00
|
|
|
(bash "workspace-sway" [
|
|
|
|
jq
|
|
|
|
libnotify
|
|
|
|
sway
|
|
|
|
])
|
2024-09-29 18:42:11 +00:00
|
|
|
(bash "workspace" [
|
|
|
|
argc
|
|
|
|
coreutils
|
|
|
|
hyprland
|
|
|
|
jq
|
|
|
|
libnotify
|
|
|
|
])
|
2024-09-24 16:01:49 +00:00
|
|
|
(bash "zoom" [
|
|
|
|
argc
|
|
|
|
bc
|
|
|
|
hyprland
|
|
|
|
jq
|
|
|
|
])
|
2024-09-13 01:50:53 +00:00
|
|
|
]
|
|
|
|
++ (with pkgs.python3Packages; [
|
|
|
|
# Python files with extension .py
|
|
|
|
(python "bcrypt" [bcrypt])
|
|
|
|
])
|
|
|
|
)
|
2024-09-09 00:22:14 +00:00
|
|
|
);
|
|
|
|
}
|