mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Missing from nixexprs combination
This commit is contained in:
parent
6487421624
commit
f6e2fb570d
13 changed files with 126 additions and 21 deletions
|
|
@ -5,4 +5,8 @@ final: prev: {
|
|||
vfio-vm = final.callPackage ./vm.nix { };
|
||||
vfio-vm-pinning = final.callPackage ./vm-pinning.nix { };
|
||||
vfio-disk-mapper = final.callPackage ./disk-mapper.nix { };
|
||||
xbackbone = final.callPackage ./xbackbone.nix { };
|
||||
waybar-gpg = final.callPackage ./waybar-gpg { };
|
||||
waybar-konawall = final.callPackage ./waybar-konawall { };
|
||||
hedgedoc-cli = final.callPackage ./hedgedoc-cli.nix { };
|
||||
}
|
||||
|
|
|
|||
27
overlays/local/hedgedoc-cli.nix
Normal file
27
overlays/local/hedgedoc-cli.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, makeWrapper, fetchFromGitHub, jq, curl, wget }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "hedgedoc-cli";
|
||||
version = "2021-05-17";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hedgedoc";
|
||||
repo = "cli";
|
||||
rev = "8b13b8836cf330921856907d905421d34a1e645c";
|
||||
sha256 = "1971v02jxlnxi09h0c6w3nzgq8w7b6ry09hjnvggypgxfjh53lhk";
|
||||
};
|
||||
|
||||
paths = lib.makeBinPath [
|
||||
jq curl wget
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm0755 bin/hedgedoc $out/bin/hdcli
|
||||
wrapProgram $out/bin/hdcli \
|
||||
--prefix PATH : "$paths"
|
||||
'';
|
||||
}
|
||||
5
overlays/local/waybar-gpg/default.nix
Normal file
5
overlays/local/waybar-gpg/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ wrapShellScriptBin, pkgs }:
|
||||
|
||||
wrapShellScriptBin "kat-gpg-status" ./kat-gpg-status.sh {
|
||||
depsRuntimePath = with pkgs; [ coreutils gnupg ];
|
||||
}
|
||||
12
overlays/local/waybar-gpg/kat-gpg-status.sh
Normal file
12
overlays/local/waybar-gpg/kat-gpg-status.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
if gpg --card-status &> /dev/null; then
|
||||
user="$(gpg --card-status | grep 'Login data' | awk '{print $NF}')";
|
||||
status='{"text": "", "alt": "User: '"$user"'", "class": "enabled"}'
|
||||
else
|
||||
status='{"text": "", "alt": "No card is connected.", "class": "disabled"}'
|
||||
fi
|
||||
|
||||
echo $status
|
||||
17
overlays/local/waybar-konawall/default.nix
Normal file
17
overlays/local/waybar-konawall/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ stdenv, wrapShellScriptBin, pkgs }:
|
||||
|
||||
let
|
||||
toggle = wrapShellScriptBin "konawall-toggle" ./toggle.sh { };
|
||||
status = wrapShellScriptBin "konawall-status" ./status.sh { };
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "konawall-toggle";
|
||||
version = "0.0.1";
|
||||
unpackPhase = "true";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ${status}/bin/konawall-status $out/bin/konawall-status
|
||||
cp ${toggle}/bin/konawall-toggle $out/bin/konawall-toggle
|
||||
chmod +x $out/bin/konawall-{status,toggle}
|
||||
'';
|
||||
}
|
||||
13
overlays/local/waybar-konawall/status.sh
Normal file
13
overlays/local/waybar-konawall/status.sh
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
sleep 0.5s
|
||||
|
||||
if systemctl --user is-active konawall-rotation.timer --quiet; then
|
||||
status='{"text": "", "alt": "Konawall is enabled.", "class": "enabled"}'
|
||||
else
|
||||
status='{"text": "", "alt": "Konawall is disabled.", "class": "disabled"}'
|
||||
fi
|
||||
|
||||
echo $status
|
||||
12
overlays/local/waybar-konawall/toggle.sh
Normal file
12
overlays/local/waybar-konawall/toggle.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
|
||||
if systemctl --user is-active konawall-rotation.timer --quiet; then
|
||||
systemctl --user stop konawall-rotation.timer
|
||||
else
|
||||
systemctl --user start konawall-rotation.timer
|
||||
fi
|
||||
|
||||
pkill -SIGRTMIN+8 waybar
|
||||
35
overlays/local/xbackbone.nix
Normal file
35
overlays/local/xbackbone.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, php
|
||||
, fetchurl
|
||||
, unzip
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "XBackBone";
|
||||
version = "3.5.0";
|
||||
|
||||
nativeBuildInputs = [
|
||||
unzip
|
||||
];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/SergiX44/XBackBone/releases/download/${version}/release-v${version}.zip";
|
||||
sha256 = "17p180yhsgjsm9pa5vkmqfrk71avss33vw2bjb6py90dwknbkipl";
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
mv * $out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A lightweight file manager with full ShareX, Screencloud support and more";
|
||||
homepage = "https://xbackbone.app/";
|
||||
license = with licenses; agpl3;
|
||||
maintainers = with maintainers; [ kittywitch ];
|
||||
platforms = with platforms; unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue