Missing from nixexprs combination

This commit is contained in:
kat 2022-04-12 16:24:31 +01:00 committed by kat
parent 6487421624
commit f6e2fb570d
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
13 changed files with 126 additions and 21 deletions

View file

@ -14,7 +14,6 @@
users.kat.guiX11Full
users.kat.services.weechat
services.nginx
services.katsplash
services.restic
services.zfs
];

View file

@ -27,14 +27,5 @@
};
};
services.nginx.virtualHosts =
let
splashy = pkgs.host-splash-site config.networking.hostName;
in
kw.virtualHostGen {
networkFilter = [ "public" ];
block.locations."/" = { root = splashy; };
};
system.stateVersion = "21.11";
}

View file

@ -11,7 +11,6 @@
generic-extlinux-compatible.enable = true;
};
consoleLogLevel = lib.mkDefault 7;
kernelPackages = pkgs.linuxPackages_rpi1;
kernelModules = mkForce [ "loop" "atkbd" ];
initrd = {
includeDefaultModules = false;

View file

@ -1,9 +0,0 @@
{ config, pkgs, kw, ... }:
let splashy = pkgs.host-splash-site config.networking.hostName; in
{
services.nginx.virtualHosts = kw.virtualHostGen {
networkFilter = [ "private" ];
block.locations."/" = { root = splashy; };
};
}

@ -1 +1 @@
Subproject commit bb2c466204d46307e3e374a526268c37ca4f7839
Subproject commit 84b1742d36714279de336e2bee37848d0b3b6de8

View file

@ -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 { };
}

View 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"
'';
}

View file

@ -0,0 +1,5 @@
{ wrapShellScriptBin, pkgs }:
wrapShellScriptBin "kat-gpg-status" ./kat-gpg-status.sh {
depsRuntimePath = with pkgs; [ coreutils gnupg ];
}

View 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

View 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}
'';
}

View 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

View 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

View 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;
};
}