Merge remote-tracking branch 'ni/master'
This commit is contained in:
commit
c5b36af49f
|
@ -1,12 +1,13 @@
|
|||
{ mkDerivation, base, fetchgit, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "scanner";
|
||||
version = "1.0.0";
|
||||
version = "1.0.1";
|
||||
src = fetchgit {
|
||||
url = http://cgit.ni.krebsco.de/scanner;
|
||||
rev = "7f091a3bc152ad3974a1873b460fa1759bf8dcad";
|
||||
url = "http://cgit.ni.krebsco.de/scanner";
|
||||
sha256 = "1lgl158axczsm4fx53fyq1d4116v91jsx4dbz66ka4k1ljqrmhgn";
|
||||
rev = "7f091a3bc152ad3974a1873b460fa1759bf8dcad";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
libraryHaskellDepends = [ base ];
|
||||
license = stdenv.lib.licenses.wtfpl;
|
||||
license = stdenv.lib.licenses.mit;
|
||||
}
|
||||
|
|
|
@ -3,11 +3,7 @@
|
|||
stdenv.mkDerivation rec {
|
||||
name = "TabFS";
|
||||
|
||||
src = pkgs.fetchgit {
|
||||
url = https://cgit.krebsco.de/TabFS;
|
||||
rev = "1fc4845283a0e6aa46a8d8978f356d5ccdcedd13";
|
||||
sha256 = "0bsm5fhxrr6zwbnm9p10h9pwm85llr02g2ch97a62r62dhjjrc8h";
|
||||
};
|
||||
src = pkgs.fetchgit (lib.importJSON ./src.json);
|
||||
|
||||
phases = [
|
||||
"unpackPhase"
|
||||
|
|
10
krebs/5pkgs/simple/TabFS/src.json
Normal file
10
krebs/5pkgs/simple/TabFS/src.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"url": "https://cgit.krebsco.de/TabFS",
|
||||
"rev": "a6045e0e29b85e3e66c468f3561009ded1db6ec5",
|
||||
"date": "2021-01-14T23:56:09+01:00",
|
||||
"path": "/nix/store/mbcywm1yq5vr7awxqb533faz34minfax-TabFS",
|
||||
"sha256": "1z0kj95zh0jl8laa0whra1jys8pws3199sy29vmlv2nxrkz13blv",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{ coreutils, git, writeDashBin }:
|
||||
|
||||
writeDashBin "git-preview" ''
|
||||
set -efu
|
||||
head_commit=$(${git}/bin/git log -1 --format=%H)
|
||||
merge_commit=$1; shift
|
||||
merge_message='Merge for git-preview'
|
||||
preview_dir=$(${coreutils}/bin/mktemp --tmpdir -d git-preview.XXXXXXXX)
|
||||
preview_branch=$(${coreutils}/bin/basename "$preview_dir")
|
||||
${git}/bin/git worktree add -b "$preview_branch" "$preview_dir" >/dev/null
|
||||
${git}/bin/git -C "$preview_dir" checkout "$head_commit"
|
||||
${git}/bin/git -C "$preview_dir" merge -m "$merge_message" "$merge_commit"
|
||||
${git}/bin/git -C "$preview_dir" diff "$head_commit.." "$@" &
|
||||
${git}/bin/git branch -fd "$preview_branch"
|
||||
${coreutils}/bin/rm -fR "$preview_dir"
|
||||
wait
|
||||
''
|
|
@ -1 +1 @@
|
|||
Subproject commit 5ea125514e48c630120fbb6a44e9ae0c7932a123
|
||||
Subproject commit c2fa48550f2bb46009b9cecdb9ac838dc402ce19
|
|
@ -17,6 +17,7 @@ with import <stockholm/lib>;
|
|||
boot.initrd.luks.devices.muca.device = "/dev/sda2";
|
||||
boot.initrd.availableKernelModules = [ "ahci" ];
|
||||
boot.kernelModules = [ "fbcon" "kvm-intel" ];
|
||||
boot.kernelParams = [ "fsck.repair=yes" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems = {
|
||||
|
@ -109,9 +110,8 @@ with import <stockholm/lib>;
|
|||
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
|
||||
services.xserver.displayManager.lightdm.autoLogin.enable = true;
|
||||
services.xserver.displayManager.lightdm.autoLogin.user = "vv";
|
||||
services.xserver.displayManager.lightdm.enable = true;
|
||||
services.xserver.displayManager.autoLogin.enable = true;
|
||||
services.xserver.displayManager.autoLogin.user = "vv";
|
||||
|
||||
users.users.vv = {
|
||||
inherit (config.krebs.users.vv) home uid;
|
||||
|
|
|
@ -28,6 +28,9 @@ in {
|
|||
});
|
||||
'';
|
||||
systemd.services."slock-${cfg.user.name}@" = {
|
||||
conflicts = [
|
||||
"picom@%i.target"
|
||||
];
|
||||
environment = {
|
||||
DISPLAY = ":%I";
|
||||
LD_PRELOAD = pkgs.runCommandCC "slock-${cfg.user.name}.so" {
|
||||
|
@ -61,6 +64,8 @@ in {
|
|||
restartIfChanged = false;
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.slock}/bin/slock";
|
||||
ExecStopPost =
|
||||
"+${pkgs.systemd}/bin/systemctl start xsession@%i.target";
|
||||
OOMScoreAdjust = -1000;
|
||||
Restart = "on-failure";
|
||||
RestartSec = "100ms";
|
||||
|
|
|
@ -8,6 +8,7 @@ import System.Exit (exitFailure)
|
|||
|
||||
import Control.Exception
|
||||
import Control.Monad.Extra (whenJustM)
|
||||
import qualified Data.List
|
||||
import Graphics.X11.ExtraTypes.XF86
|
||||
import Text.Read (readEither)
|
||||
import XMonad
|
||||
|
@ -59,6 +60,11 @@ main = getArgs >>= \case
|
|||
args -> hPutStrLn stderr ("bad arguments: " <> show args) >> exitFailure
|
||||
|
||||
|
||||
queryPrefix :: Query String -> String -> Query Bool
|
||||
queryPrefix query prefix =
|
||||
fmap (Data.List.isPrefixOf prefix) query
|
||||
|
||||
|
||||
mainNoArgs :: IO ()
|
||||
mainNoArgs = do
|
||||
workspaces0 <- getWorkspaces0
|
||||
|
@ -82,7 +88,7 @@ mainNoArgs = do
|
|||
, manageHook =
|
||||
composeAll
|
||||
[ appName =? "fzmenu-urxvt" --> doCenterFloat
|
||||
, appName =? "pinentry" --> doCenterFloat
|
||||
, appName `queryPrefix` "pinentry" --> doCenterFloat
|
||||
, title =? "Upload to Imgur" -->
|
||||
doRectFloat (W.RationalRect 0 0 (1 % 8) (1 % 8))
|
||||
, placeHook (smart (1,0))
|
||||
|
|
56
tv/5pkgs/simple/pinentry-urxvt/default.nix
Normal file
56
tv/5pkgs/simple/pinentry-urxvt/default.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{ pkgs, ... }@args:
|
||||
|
||||
let
|
||||
lib = import <stockholm/lib>;
|
||||
|
||||
# config cannot be declared in the input attribute set because that would
|
||||
# cause callPackage to inject the wrong config. Instead, get it from ...
|
||||
# via args.
|
||||
config = args.config or {};
|
||||
|
||||
cfg = eval.config;
|
||||
|
||||
eval = lib.evalModules {
|
||||
modules = lib.singleton {
|
||||
_file = toString ./default.nix;
|
||||
imports = lib.singleton config;
|
||||
options = {
|
||||
appName = lib.mkOption {
|
||||
default = "pinentry-urxvt";
|
||||
type = lib.types.str;
|
||||
};
|
||||
display = lib.mkOption {
|
||||
default = ":0";
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
in
|
||||
|
||||
pkgs.write "pinentry-urxvt" {
|
||||
"/bin/pinentry".link = pkgs.writeDash "pinentry-urxvt-wrapper" ''
|
||||
set -efu
|
||||
exec 3<&0 4>&1 5>&2
|
||||
export DISPLAY=${lib.shell.escape cfg.display}
|
||||
exec ${pkgs.rxvt_unicode}/bin/urxvt \
|
||||
-name ${lib.shell.escape cfg.appName} \
|
||||
-e ${pkgs.writeDash "pinentry-urxvt-tty" ''
|
||||
set -efu
|
||||
exec 2>&5
|
||||
TTY=$(${pkgs.coreutils}/bin/tty)
|
||||
while read -r line <&3; do
|
||||
case $line in
|
||||
'OPTION ttyname='*)
|
||||
echo "OPTION ttyname=$TTY"
|
||||
;;
|
||||
*)
|
||||
echo "$line"
|
||||
esac
|
||||
done | ${pkgs.pinentry.tty}/bin/pinentry-tty "$@" >&4
|
||||
''} \
|
||||
"$@"
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue