mirror of
https://github.com/Noratrieb/nixos.git
synced 2026-01-14 11:45:06 +01:00
add u, the most awesome program
This commit is contained in:
parent
1235ffe614
commit
dd0b4d1f71
5 changed files with 38 additions and 4 deletions
|
|
@ -3,6 +3,7 @@ pkgs: {
|
||||||
monaspace = import ./monaspace.nix pkgs;
|
monaspace = import ./monaspace.nix pkgs;
|
||||||
run = import ./run { inherit pkgs; };
|
run = import ./run { inherit pkgs; };
|
||||||
unpem = import ./unpem { inherit pkgs; };
|
unpem = import ./unpem { inherit pkgs; };
|
||||||
|
u = import ./u { inherit pkgs; };
|
||||||
x = import ./x { inherit pkgs; };
|
x = import ./x { inherit pkgs; };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
32
custom-pkgs/u/default.nix
Normal file
32
custom-pkgs/u/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{ pkgs, ... }: pkgs.writeShellApplication {
|
||||||
|
name = "u";
|
||||||
|
|
||||||
|
text = ''
|
||||||
|
programs=(cargo git)
|
||||||
|
|
||||||
|
if [ -z "''${1:-}" ]; then
|
||||||
|
echo "u: universial command executor"
|
||||||
|
echo "programs: ''${programs[*]}"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
program_to_use=""
|
||||||
|
|
||||||
|
for program in "''${programs[@]}"; do
|
||||||
|
if PAGER=true "$program" "$1" --help >/dev/null 2>/dev/null; then
|
||||||
|
if [ -n "$program_to_use" ]; then
|
||||||
|
echo "u: conflict: $1 is provided by both $program_to_use and $program" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
program_to_use="$program"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$program_to_use" ]; then
|
||||||
|
exec "$program_to_use" "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "error: cannot find program for $1" >&2
|
||||||
|
exit 1
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
@ -29,5 +29,6 @@ with pkgs; [
|
||||||
rustup-toolchain-install-master
|
rustup-toolchain-install-master
|
||||||
samply
|
samply
|
||||||
tokei
|
tokei
|
||||||
|
customPkgs.u
|
||||||
uwuify
|
uwuify
|
||||||
] ++ crates
|
] ++ crates
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
autosq = "autosquash";
|
autosq = "autosquash";
|
||||||
pfush = "!echo \"hör uf ume z'pfusche und machs richtig\"";
|
pfush = "!echo \"hör uf ume z'pfusche und machs richtig\"";
|
||||||
sw = "!git checkout $(git branch --format \"%(refname:lstrip=2)\" | ${lib.getExe' pkgs.fzf "fzf"})";
|
sw = "!git checkout $(git branch --format \"%(refname:lstrip=2)\" | ${lib.getExe' pkgs.fzf "fzf"})";
|
||||||
|
# lol
|
||||||
|
build = "!cargo build";
|
||||||
};
|
};
|
||||||
difftastic = {
|
difftastic = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -181,10 +181,8 @@ in
|
||||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gnome pkgs.gnome-keyring ];
|
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gnome pkgs.gnome-keyring ];
|
||||||
programs.waybar.enable = true;
|
programs.waybar.enable = true;
|
||||||
|
|
||||||
# TODO: Create a fancontrol config
|
programs.coolercontrol.enable = true;
|
||||||
hardware.fancontrol.enable = false;
|
programs.coolercontrol.nvidiaSupport = true;
|
||||||
hardware.fancontrol.config = ''
|
|
||||||
'';
|
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
console.keyMap = "sg";
|
console.keyMap = "sg";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue