Compare commits
No commits in common. "5acb380fc01abacddf91dc52ff036b7cbfb6a872" and "4b11a0c6337cf69e73d7324efe1c5f27161c6a11" have entirely different histories.
5acb380fc0
...
4b11a0c633
3 changed files with 13 additions and 72 deletions
|
|
@ -47,7 +47,6 @@
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
alias.ts = "!${lib.getExe pkgs.fc-scripts.git-tree-sync} sync";
|
|
||||||
credential.helper = "cache";
|
credential.helper = "cache";
|
||||||
push.default = "simple";
|
push.default = "simple";
|
||||||
push.forceIfIncludes = true; # avoid accidental force overrides when remote is autofetched in background
|
push.forceIfIncludes = true; # avoid accidental force overrides when remote is autofetched in background
|
||||||
|
|
|
||||||
|
|
@ -85,14 +85,8 @@ let
|
||||||
|
|
||||||
nix-output-monitor # putting this here as a plain `nix` alternative
|
nix-output-monitor # putting this here as a plain `nix` alternative
|
||||||
|
|
||||||
|
fc-scripts # this might turn out to be useful even in non-work environments?
|
||||||
]
|
]
|
||||||
++ (with fc-scripts; [
|
|
||||||
|
|
||||||
git-tree-sync
|
|
||||||
ssh-multi-proxy
|
|
||||||
mosh-tunnel
|
|
||||||
mosh-dualstack-proxy # this might turn out to be useful even in non-work environments?
|
|
||||||
])
|
|
||||||
++ lib.optionals pkgs.stdenv.isLinux [
|
++ lib.optionals pkgs.stdenv.isLinux [
|
||||||
xclip
|
xclip
|
||||||
smbnetfs # for FUSE smb mounting
|
smbnetfs # for FUSE smb mounting
|
||||||
|
|
|
||||||
|
|
@ -1,79 +1,27 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
runCommand,
|
||||||
python3,
|
python3,
|
||||||
stdenvNoCC,
|
stdenvNoCC,
|
||||||
makeWrapper,
|
|
||||||
git,
|
|
||||||
openssh,
|
|
||||||
mosh,
|
|
||||||
}:
|
}:
|
||||||
let
|
stdenvNoCC.mkDerivation {
|
||||||
|
pname = "fc-scripts";
|
||||||
|
version = "20260202";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "flyingcircusio";
|
owner = "flyingcircusio";
|
||||||
repo = "scripts";
|
repo = "scripts";
|
||||||
rev = "887f066006829fc3ee44b3cfbe748c578ea2e7c1";
|
rev = "887f066006829fc3ee44b3cfbe748c578ea2e7c1";
|
||||||
hash = "sha256-mrL/dULb0NKw8cH9ferzfDdRjhWANrWQg/u7FNCtzWw=";
|
hash = "sha256-mrL/dULb0NKw8cH9ferzfDdRjhWANrWQg/u7FNCtzWw=";
|
||||||
};
|
};
|
||||||
version = "20260202";
|
|
||||||
mkFcScriptDrv =
|
|
||||||
{
|
|
||||||
pname,
|
|
||||||
propagatedBuildInputs,
|
|
||||||
...
|
|
||||||
}@args:
|
|
||||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
||||||
inherit (args)
|
|
||||||
pname
|
|
||||||
propagatedBuildInputs
|
|
||||||
;
|
|
||||||
inherit src version; # not passed via function args, but can be overridden later via overrideAttrs
|
|
||||||
dontBuild = true;
|
|
||||||
dontConfigure = true;
|
|
||||||
buildInputs = [ python3 ];
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
|
||||||
|
|
||||||
|
buildInputs = [ python3 ];
|
||||||
|
dontBuild = true;
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -m 0755 ${pname}* $out/bin/${pname}
|
cp *.py $out/bin/
|
||||||
''
|
|
||||||
+ lib.optionalString (finalAttrs.propagatedBuildInputs != [ ]) ''
|
|
||||||
wrapProgram $out/bin/${pname} --prefix PATH : \
|
|
||||||
${lib.makeBinPath finalAttrs.propagatedBuildInputs}
|
|
||||||
''
|
|
||||||
+ "runHook postInstall";
|
|
||||||
|
|
||||||
meta.mainProgram = pname;
|
|
||||||
});
|
|
||||||
in
|
|
||||||
{
|
|
||||||
git-tree-sync = mkFcScriptDrv {
|
|
||||||
pname = "git-tree-sync";
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
git
|
|
||||||
openssh
|
|
||||||
];
|
|
||||||
};
|
|
||||||
ssh-multi-proxy = mkFcScriptDrv {
|
|
||||||
pname = "ssh-multi-proxy";
|
|
||||||
propagatedBuildInputs = [ openssh ];
|
|
||||||
};
|
|
||||||
mosh-tunnel = mkFcScriptDrv {
|
|
||||||
pname = "mosh-tunnel";
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
(python3.withPackages (ps: [ ps.asyncio-dgram ]))
|
|
||||||
mosh
|
|
||||||
openssh
|
|
||||||
];
|
|
||||||
};
|
|
||||||
mosh-dualstack-proxy = mkFcScriptDrv {
|
|
||||||
pname = "mosh-dualstack-proxy";
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
python3
|
|
||||||
mosh
|
|
||||||
openssh
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue