mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 18:01:29 +00:00
ci + lint
This commit is contained in:
parent
d088a98954
commit
66d9b25682
39 changed files with 395 additions and 225 deletions
|
|
@ -2,52 +2,67 @@
|
|||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
}: let
|
||||
theme = import ../lib/theme.nix {inherit config;};
|
||||
}:
|
||||
let
|
||||
theme = import ../lib/theme.nix { inherit config; };
|
||||
|
||||
tmuxConfigs = {
|
||||
dark = pkgs.writeText "tmux-theme-dark.conf" (theme.renderTmux "dark");
|
||||
light = pkgs.writeText "tmux-theme-light.conf" (theme.renderTmux "light");
|
||||
};
|
||||
|
||||
mkScript = {
|
||||
file,
|
||||
name,
|
||||
runtimeInputs ? [],
|
||||
replacements ? {},
|
||||
}:
|
||||
mkScript =
|
||||
{
|
||||
file,
|
||||
name,
|
||||
runtimeInputs ? [ ],
|
||||
replacements ? { },
|
||||
}:
|
||||
pkgs.writeShellApplication {
|
||||
inherit name runtimeInputs;
|
||||
text =
|
||||
lib.replaceStrings
|
||||
(builtins.attrNames replacements)
|
||||
(builtins.attrValues replacements)
|
||||
(builtins.readFile file);
|
||||
text = lib.replaceStrings (builtins.attrNames replacements) (builtins.attrValues replacements) (
|
||||
builtins.readFile file
|
||||
);
|
||||
};
|
||||
|
||||
packages = {
|
||||
ga = mkScript {
|
||||
name = "ga";
|
||||
file = ./ga.sh;
|
||||
runtimeInputs = with pkgs; [git];
|
||||
runtimeInputs = with pkgs; [ git ];
|
||||
};
|
||||
|
||||
ghpr = mkScript {
|
||||
name = "ghpr";
|
||||
file = ./ghpr.sh;
|
||||
runtimeInputs = with pkgs; [gh git gnugrep gnused coreutils];
|
||||
runtimeInputs = with pkgs; [
|
||||
gh
|
||||
git
|
||||
gnugrep
|
||||
gnused
|
||||
coreutils
|
||||
];
|
||||
};
|
||||
|
||||
gpr = mkScript {
|
||||
name = "gpr";
|
||||
file = ./gpr.sh;
|
||||
runtimeInputs = with pkgs; [gh fzf gnugrep coreutils];
|
||||
runtimeInputs = with pkgs; [
|
||||
gh
|
||||
fzf
|
||||
gnugrep
|
||||
coreutils
|
||||
];
|
||||
};
|
||||
|
||||
iosrun = mkScript {
|
||||
name = "iosrun";
|
||||
file = ./iosrun.sh;
|
||||
runtimeInputs = with pkgs; [findutils gnugrep coreutils];
|
||||
runtimeInputs = with pkgs; [
|
||||
findutils
|
||||
gnugrep
|
||||
coreutils
|
||||
];
|
||||
};
|
||||
|
||||
mdview = mkScript {
|
||||
|
|
@ -58,13 +73,18 @@
|
|||
ni = mkScript {
|
||||
name = "ni";
|
||||
file = ./ni.sh;
|
||||
runtimeInputs = with pkgs; [nix];
|
||||
runtimeInputs = with pkgs; [ nix ];
|
||||
};
|
||||
|
||||
theme = mkScript {
|
||||
name = "theme";
|
||||
file = ./theme.sh;
|
||||
runtimeInputs = with pkgs; [coreutils findutils neovim tmux];
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils
|
||||
findutils
|
||||
neovim
|
||||
tmux
|
||||
];
|
||||
replacements = {
|
||||
"@DEFAULT_MODE@" = theme.defaultMode;
|
||||
"@STATE_DIR@" = theme.paths.stateDir;
|
||||
|
|
@ -90,6 +110,7 @@
|
|||
file = ./wtc.sh;
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
inherit packages theme tmuxConfigs;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue