From bfb5617f015d2810d04b07a4119ed9ef477ce66b Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 25 Sep 2018 19:02:09 +0200 Subject: tv gitrepos: add fswm --- tv/2configs/gitrepos.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tv') diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index 74fb5215..8e4beca1 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -39,6 +39,9 @@ let { disko = { cgit.desc = "declarative partitioning and formatting tool"; }; + fswm = { + cgit.desc = "simple full screen window manager"; + }; get = {}; hstool = { cgit.desc = "Haskell Development Environment ^_^"; -- cgit v1.2.3 From 4f530d344dc98d1535aa87af640bc1fe049b52e4 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Sep 2018 15:16:11 +0200 Subject: tv gitrepos nix-writers: add cgit desc --- tv/2configs/gitrepos.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index 8e4beca1..00873bd5 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -64,7 +64,9 @@ let { netcup = { cgit.desc = "netcup command line interface"; }; - nix-writers = {}; + nix-writers = { + cgit.desc = "collection of package builders"; + }; populate = { cgit.desc = "source code installer"; }; -- cgit v1.2.3 From a93aaeecd65843b6daab9c4030862fe859c435f7 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Sep 2018 15:18:43 +0200 Subject: tv gitrepos: move unused stuff to museums --- tv/2configs/gitrepos.nix | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'tv') diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index 00873bd5..e7104be3 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -30,9 +30,6 @@ let { public-repos = mapAttrs make-public-repo ({ } // mapAttrs (_: recursiveUpdate { cgit.section = "1. miscellaneous"; }) { - cac-api = { - cgit.desc = "CloudAtCost API command line interface"; - }; dic = { cgit.desc = "dict.leo.org command line interface"; }; @@ -42,24 +39,12 @@ let { fswm = { cgit.desc = "simple full screen window manager"; }; - get = {}; - hstool = { - cgit.desc = "Haskell Development Environment ^_^"; - }; htgen = { cgit.desc = "toy HTTP server"; }; - kirk = { - cgit.desc = "IRC tools"; - }; krops = { cgit.desc = "deployment tools"; }; - load-env = {}; - loldns = { - cgit.desc = "toy DNS server"; - }; - make-snapshot = {}; much = {}; netcup = { cgit.desc = "netcup command line interface"; @@ -72,9 +57,6 @@ let { }; q = {}; regfish = {}; - soundcloud = { - cgit.desc = "SoundCloud command line interface"; - }; stockholm = { cgit.desc = "NixOS configuration"; }; @@ -91,15 +73,32 @@ let { xintmap = {}; xmonad-stockholm = {}; } // mapAttrs (_: recursiveUpdate { cgit.section = "4. museum"; }) { + cac-api = { + cgit.desc = "CloudAtCost API command line interface"; + }; cgserver = {}; crude-mail-setup = {}; dot-xmonad = {}; hirc = {}; + hstool = { + cgit.desc = "Haskell Development Environment ^_^"; + }; + kirk = { + cgit.desc = "IRC tools"; + }; make-snapshot = {}; nixos-infest = {}; painload = {}; push = {}; with-tmpdir = {}; + get = {}; + load-env = {}; + loldns = { + cgit.desc = "toy DNS server"; + }; + soundcloud = { + cgit.desc = "SoundCloud command line interface"; + }; }); restricted-repos = mapAttrs make-restricted-repo ( -- cgit v1.2.3 From cc7f4937697a60690a0f47668d6f8b6888722ec5 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 28 Sep 2018 16:20:48 +0200 Subject: tv gitrepos cgit: use README.md for about pages --- tv/2configs/gitrepos.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index e7104be3..a8cbe0f1 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -9,8 +9,19 @@ let { enable = true; cgit = { settings = { - root-title = "repositories at ${config.krebs.build.host.name}"; + about-filter = pkgs.exec "krebs.cgit.about-filter" rec { + filename = "${pkgs.pythonPackages.markdown2}/bin/markdown2"; + argv = [ + filename + "--extras=fenced-code-blocks" + ]; + envp = {}; + }; + readme = [ + ":README.md" + ]; root-desc = "mostly krebs"; + root-title = "repositories at ${config.krebs.build.host.name}"; }; }; repos = repos; -- cgit v1.2.3 From 0c70e8fb51ea44b9a113efcb654463b792a5789c Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 29 Sep 2018 10:26:36 +0200 Subject: tv urlwatch: filter all api.github.com results --- tv/2configs/urlwatch.nix | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'tv') diff --git a/tv/2configs/urlwatch.nix b/tv/2configs/urlwatch.nix index aa71be77..77947daf 100644 --- a/tv/2configs/urlwatch.nix +++ b/tv/2configs/urlwatch.nix @@ -1,6 +1,10 @@ -{ config, pkgs, ... }: with import ; -{ +{ config, pkgs, ... }: let + json = url: { + inherit url; + filter = "system:${pkgs.jq}/bin/jq ."; + }; +in { krebs.urlwatch = { enable = true; mailto = config.krebs.users.tv.mail; @@ -13,18 +17,9 @@ with import ; http://www.exim.org/ - # ref src/nixpkgs/pkgs/tools/admin/sec/default.nix - { - url = https://api.github.com/repos/simple-evcorr/sec/tags; - filter = "system:${pkgs.jq}/bin/jq ."; - } - # ref src/nixpkgs/pkgs/tools/networking/urlwatch/default.nix https://thp.io/2008/urlwatch/ - # 2014-12-20 ref src/nixpkgs/pkgs/tools/networking/tlsdate/default.nix - https://api.github.com/repos/ioerror/tlsdate/tags - # 2015-02-18 # ref ~/src/nixpkgs/pkgs/tools/text/qprint/default.nix http://www.fourmilab.ch/webtools/qprint/ @@ -50,7 +45,13 @@ with import ; #http://hackage.haskell.org/package/web-page # ref , services.openssh.knownHosts.github* - https://api.github.com/meta + (json https://api.github.com/meta) + + # 2014-12-20 ref src/nixpkgs/pkgs/tools/networking/tlsdate/default.nix + (json https://api.github.com/repos/ioerror/tlsdate/tags) + + # ref src/nixpkgs/pkgs/tools/admin/sec/default.nix + (json https://api.github.com/repos/simple-evcorr/sec/tags) # # is derived from `configFile` in: -- cgit v1.2.3 From ba5e2081cdb899e47efb04d9c0cac605685e1765 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 3 Oct 2018 10:14:20 +0200 Subject: tv mu: use br --- tv/1systems/mu/config.nix | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'tv') diff --git a/tv/1systems/mu/config.nix b/tv/1systems/mu/config.nix index f5136654..c26d4ab3 100644 --- a/tv/1systems/mu/config.nix +++ b/tv/1systems/mu/config.nix @@ -3,6 +3,7 @@ with import ; imports = [ + ]; @@ -90,20 +91,6 @@ with import ; pkgs.xlibs.fontschumachermisc ]; - # Enable CUPS to print documents. - services.printing = { - enable = true; - #drivers = [ - # #pkgs.foomatic_filters - # #pkgs.gutenprint - # #pkgs.cups_pdf_filter - # #pkgs.ghostscript - #]; - #cupsdConf = '' - # LogLevel debug2 - #''; - }; - services.xserver.enable = true; services.xserver.layout = "de"; services.xserver.xkbOptions = "eurosign:e"; -- cgit v1.2.3 From 0a65f69db31e75851e810d461b4882b29653e087 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 3 Oct 2018 22:23:31 +0200 Subject: tv bash: use XMONAD_SPAWN_WORKSPACE when SHLVL=1 --- tv/2configs/bash/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tv') diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix index 546b2e7b..b75ad8bf 100644 --- a/tv/2configs/bash/default.nix +++ b/tv/2configs/bash/default.nix @@ -33,11 +33,13 @@ with import ; PS1="ssh-agent[$SSH_AGENT_PID] $PS1" fi - case ''${XMONAD_SPAWN_WORKSPACE-} in - stockholm) - cd ~/stockholm - ;; - esac + if test ''${SHLVL-1} = 1; then + case ''${XMONAD_SPAWN_WORKSPACE-} in + stockholm) + cd ~/stockholm + ;; + esac + fi ''; }; } -- cgit v1.2.3 From d2d9c3df5d7cea1c5b51a2b007c79d9e16c2ac56 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 5 Oct 2018 13:59:01 +0200 Subject: tv pkgs: init utsushi at 3.48.0 --- tv/5pkgs/simple/utsushi.nix | 206 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 tv/5pkgs/simple/utsushi.nix (limited to 'tv') diff --git a/tv/5pkgs/simple/utsushi.nix b/tv/5pkgs/simple/utsushi.nix new file mode 100644 index 00000000..518c34ca --- /dev/null +++ b/tv/5pkgs/simple/utsushi.nix @@ -0,0 +1,206 @@ +{ boost, fetchurl, file, imagemagick, libudev, libusb, pkgconfig, stdenv +, coreutils, dash, patchelf, writeScriptBin # for add-rpath + +, guiSupport ? false, gtkmm2 ? null +, jpegSupport ? true +, networkSupport ? false, dpkg ? null +, ocrSupport ? false, tesseract ? null +, saneSupport ? true, saneBackends ? null +, tiffSupport ? true, libtiff ? null + +# Logging defaults copied from Utsushi source (lib/log.cpp) +, logCategory ? "NOTHING" +, logLevel ? "FATAL" +}: + +# Logging possibilities copied from Utsushi source (utsushi/log.hpp) +assert builtins.elem logCategory [ + "NOTHING" + "SANE_BACKEND" + "ALL" +]; +assert builtins.elem logLevel [ + "FATAL" # famous last words + "ALERT" # outside intervention required + "ERROR" # something went wrong + "BRIEF" # short informational notes + "TRACE" # more chattery feedback + "DEBUG" # the gory details + "QUARK" # stack tracing feedback +]; + +let + + # usage: add-rpath LIBPATH [SOFILE...] + # Adds LIBPATH to each SOFILE's RPATH + add-rpath = writeScriptBin "add-rpath" '' + #! ${dash}/bin/dash + set -efu + path=$1; shift + for file; do + file=$(${coreutils}/bin/readlink -f "$file") + old_rpath=$(${patchelf}/bin/patchelf --print-rpath "$file") + new_rpath=''${old_rpath+$old_rpath:}$path + ${patchelf}/bin/patchelf --set-rpath "$new_rpath" "$file" + done + ''; + + imagescan-plugin-networkscan = stdenv.mkDerivation rec { + name = "imagescan-plugin-networkscan-${meta.version}"; + + src = + if stdenv.system == "i686-linux" then + fetchurl { + url = "https://download2.ebz.epson.net/imagescanv3/debian/latest1/deb/x64/imagescan-bundle-debian-9-1.3.21.x86.deb.tar.gz"; + sha256 = "16xv1pdfm2ryis815fawb7zqg6c4swww726g272ssx044r5dp80r"; + } + else if stdenv.system == "x86_64-linux" then + fetchurl { + url = "https://download2.ebz.epson.net/imagescanv3/debian/latest1/deb/x64/imagescan-bundle-debian-9-1.3.21.x64.deb.tar.gz"; + sha256 = "0zik35h2jwrvkwcmq55wc72imidwdnmn1bayhypzhjcz61rasjg2"; + } + else throw "${name} is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)"; + + dontBuild = true; + + installPhase = '' + # Wildcard * stand for either i386 or amd64 + ${dpkg}/bin/dpkg -x \ + plugins/imagescan-plugin-networkscan_${meta.version}-1epson4debian9_*.deb \ + tmp + + mv tmp/usr $out + ''; + + preFixup = '' + patchelf --set-interpreter \ + ${stdenv.glibc}/lib/ld-linux${stdenv.lib.optionalString stdenv.is64bit "-x86-64"}.so.2 \ + $out/lib/utsushi/networkscan + + # libstdc++.so.6 + patchelf --set-rpath ${stdenv.cc.cc.lib}/lib \ + $out/lib/utsushi/networkscan + ''; + + meta = { + description = "Epson Image Scan v3 networkscan plugin"; + longDescription = '' + This package provides the unfree networkscan plugin from the Epson + Image Scan v3 scanner driver bundle, which can be used by Utsushi. + ''; + homepage = "http://support.epson.net/linux/en/imagescanv3.php?version=${meta.version}"; + license = stdenv.lib.licenses.eapl; + maintainers = [ stdenv.lib.maintainers.tv ]; + platforms = stdenv.lib.platforms.linux; + version = "1.1.0"; + }; + }; + +in + +stdenv.mkDerivation rec { + name = "utsushi-${meta.version}"; + + src = fetchurl { + url = "http://support.epson.net/linux/src/scanner/imagescanv3/debian/imagescan_${meta.version}.orig.tar.gz"; + sha256 = "12mzq3wc8gzdma84pjs5gb0gp8mga13wax5g7vjfrzq8pjyqrnmw"; + }; + + preConfigure = '' + substituteInPlace configure \ + --replace /usr/bin/file ${file}/bin/file + + substituteInPlace lib/log.cpp \ + --replace FATAL ${logLevel} \ + --replace NOTHING ${logCategory} + ''; + + postInstall = '' + # Allow configuration to be done via /etc/utsushi.conf + ln -s /etc/utsushi.conf $out/etc/utsushi/utsushi.conf + + ${stdenv.lib.optionalString saneSupport '' + # Make this package compatible with hardware.sane.extraBackends + mkdir $out/etc/sane.d + echo utsushi > $out/etc/sane.d/dll.conf + mkdir $out/lib/sane + ln -s $out/lib/utsushi/sane/libsane-utsushi.* $out/lib/sane + ''} + + ${stdenv.lib.optionalString networkSupport '' + ln -s ${imagescan-plugin-networkscan}/lib/utsushi/networkscan \ + $out/libexec/utsushi/ + ''} + ''; + + # Fixup libraries which otherwise would end up broken like this: + # + # $ ldd .../blah.so | grep libboost_system + # libboost_system.so.X.Y.Z => not found + # libboost_system.so.X.Y.Z => /nix/store/.../libboost_system.so.X.Y.Z (...) + # + preFixup = '' + add-rpath ${boost}/lib $out/lib/utsushi/libdrv-esci.so + ${stdenv.lib.optionalString saneSupport '' + add-rpath ${boost}/lib $out/lib/utsushi/sane/libsane-utsushi.so + ''} + ''; + + nativeBuildInputs = [ + add-rpath + pkgconfig + ]; + + buildInputs = [ + boost + imagemagick + libudev + libusb + ] + ++ stdenv.lib.optional guiSupport gtkmm2 + ++ stdenv.lib.optional ocrSupport tesseract + ++ stdenv.lib.optional saneSupport saneBackends + ++ stdenv.lib.optional tiffSupport libtiff + ; + + NIX_CFLAGS_COMPILE = [ + "-Wno-error=unused-variable" + ]; + + configureFlags = [ + "--with-boost=${boost}" + "--with-magick" + "--with-magick-pp" + ] + ++ stdenv.lib.optionals guiSupport [ + "--with-gtkmm" + ] + ++ stdenv.lib.optionals jpegSupport [ + "--with-jpeg" + ] + ++ stdenv.lib.optionals saneSupport [ + "--with-sane" + ] + ++ stdenv.lib.optionals tiffSupport [ + "--with-tiff" + ] + ; + + meta = { + description = "Utsushi - Next Generation Image Acquisition"; + longDescription = '' + This software provides applications to easily turn hard-copy + documents and imagery into formats that are more amenable to + computer processing. + + Included are a native driver for a number of EPSON scanners + and a compatibility driver to interface with software built + around the SANE standard. + ''; + homepage = http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX; + license = stdenv.lib.licenses.gpl3; + maintainers = [ stdenv.lib.maintainers.tv ]; + platforms = stdenv.lib.platforms.linux; + version = "3.48.0"; + }; +} -- cgit v1.2.3 From 9ea7ccd94f1ac2746fcff1739859d4bc27aa0c98 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 5 Oct 2018 22:13:26 +0200 Subject: tv xp-332: init --- tv/2configs/xp-332.nix | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 tv/2configs/xp-332.nix (limited to 'tv') diff --git a/tv/2configs/xp-332.nix b/tv/2configs/xp-332.nix new file mode 100644 index 00000000..627401dc --- /dev/null +++ b/tv/2configs/xp-332.nix @@ -0,0 +1,45 @@ +with import ; +{ config, pkgs, ... }: { + + environment.etc."utsushi.conf".text = '' + [devices] + dev1.udi = esci:networkscan://EPSON79678C.fritz.box:1865 + dev1.model = XP-332 + dev1.vendor = EPSON + ''; + + hardware.sane = { + enable = true; + extraBackends = [ + pkgs.utsushi + ]; + }; + + krebs.nixpkgs.allowUnfreePredicate = pkg: + elem (parseDrvName pkg.name).name [ "imagescan-plugin-networkscan" ]; + + nixpkgs.overlays = singleton (self: super: { + utsushi = super.utsushi.override { + guiSupport = false; + jpegSupport = false; + networkSupport = true; + ocrSupport = false; + saneSupport = true; + tiffSupport = true; + + logCategory = "ALL"; + logLevel = "BRIEF"; + }; + }); + + services = { + printing = { + drivers = [ + pkgs.epson-escpr + ]; + enable = true; + }; + saned.enable = true; + }; + +} -- cgit v1.2.3 From 9b714e774e863280801e868bb5c21631da02fd8c Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 5 Oct 2018 22:14:36 +0200 Subject: tv querel: import xp-332 --- tv/1systems/querel/config.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'tv') diff --git a/tv/1systems/querel/config.nix b/tv/1systems/querel/config.nix index 5f981c64..01d67b5f 100644 --- a/tv/1systems/querel/config.nix +++ b/tv/1systems/querel/config.nix @@ -2,10 +2,9 @@ with import ; { config, pkgs, ... }: { imports = [ - - - + + ]; krebs.build.host = config.krebs.hosts.querel; @@ -37,6 +36,7 @@ with import ; sxiv texlive.combined.scheme-full vim + xsane zathura ]; @@ -67,10 +67,6 @@ with import ; programs.ssh.startAgent = false; - services.printing = { - enable = true; - }; - services.xserver.enable = true; services.xserver.layout = "de"; services.xserver.xkbOptions = "eurosign:e"; -- cgit v1.2.3 From 9f66fcc63a2d1dba5598e17d7b25ba4df53988cf Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 6 Oct 2018 19:32:25 +0200 Subject: force xserver values --- tv/2configs/xserver/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tv') diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 6ef8a876..e33b431d 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -42,8 +42,8 @@ in { desktopManager.session = mkForce []; enable = true; - display = 11; - tty = 11; + display = mkForce 11; + tty = mkForce 11; synaptics = { enable = true; -- cgit v1.2.3 From 0cb43393303d2b6bbab19d4d5c45ce371a9ef621 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 7 Oct 2018 09:54:55 +0200 Subject: tv xserver: cleanup services --- tv/2configs/xserver/default.nix | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'tv') diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 6ef8a876..96c59c6a 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -55,7 +55,7 @@ in { systemd.services.display-manager.enable = false; systemd.services.xmonad = { - wantedBy = [ "multi-user.target" ]; + wantedBy = [ "graphical.target" ]; requires = [ "xserver.service" ]; environment = { DISPLAY = ":${toString config.services.xserver.display}"; @@ -101,21 +101,20 @@ in { systemd.services.xserver = { after = [ - "systemd-udev-settle.service" - "local-fs.target" "acpid.service" + "local-fs.target" + "systemd-udev-settle.service" + ]; + wants = [ + "systemd-udev-settle.service" ]; - reloadIfChanged = true; + restartIfChanged = false; environment = { - XKB_BINDIR = "${pkgs.xorg.xkbcomp}/bin"; # Needed for the Xkb extension. - XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime. - LD_LIBRARY_PATH = concatStringsSep ":" ( - [ "${pkgs.xorg.libX11}/lib" "${pkgs.xorg.libXext}/lib" ] + LD_LIBRARY_PATH = concatStringsSep ":" ([ "/run/opengl-driver/lib" ] ++ concatLists (catAttrs "libPath" config.services.xserver.drivers)); }; serviceConfig = { SyslogIdentifier = "xserver"; - ExecReload = "${pkgs.coreutils}/bin/echo NOP"; ExecStart = toString [ "${pkgs.xorg.xorgserver}/bin/X" ":${toString config.services.xserver.display}" @@ -123,17 +122,16 @@ in { "-config ${import ./xserver.conf.nix args}" "-logfile /dev/null -logverbose 0 -verbose 3" "-nolisten tcp" - "-xkbdir ${pkgs.xkeyboard_config}/etc/X11/xkb" + "-xkbdir ${config.services.xserver.xkbDir}" ]; }; }; systemd.services.urxvtd = { - wantedBy = [ "multi-user.target" ]; - reloadIfChanged = true; + wantedBy = [ "graphical.target" ]; + restartIfChanged = false; serviceConfig = { SyslogIdentifier = "urxvtd"; - ExecReload = "${pkgs.coreutils}/bin/echo NOP"; ExecStart = "${pkgs.rxvt_unicode}/bin/urxvtd"; Restart = "always"; RestartSec = "2s"; -- cgit v1.2.3 From 85ebdc2437f848fad1d96189ea3095aa34eefc38 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 7 Oct 2018 10:17:21 +0200 Subject: tv xu: import xp-332 --- tv/1systems/xu/config.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tv') diff --git a/tv/1systems/xu/config.nix b/tv/1systems/xu/config.nix index 14926fe3..24179cc3 100644 --- a/tv/1systems/xu/config.nix +++ b/tv/1systems/xu/config.nix @@ -18,6 +18,7 @@ with import ; + { environment.systemPackages = with pkgs; [ @@ -147,8 +148,6 @@ with import ; gptfdisk ]; - services.printing.enable = true; - #services.bitlbee.enable = true; #services.tor.client.enable = true; #services.tor.enable = true; -- cgit v1.2.3 From e4c90d8cbea4c929a83358700e563978270724c0 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 7 Oct 2018 10:18:07 +0200 Subject: tv backups: nomic-pull-querel-home @22:00 --- tv/2configs/backup.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/backup.nix b/tv/2configs/backup.nix index 14d38156..f8de72d0 100644 --- a/tv/2configs/backup.nix +++ b/tv/2configs/backup.nix @@ -26,7 +26,7 @@ with import ; method = "pull"; src = { host = config.krebs.hosts.querel; path = "/home"; }; dst = { host = config.krebs.hosts.nomic; path = "/fs/ponyhof/bku/querel-home"; }; - startAt = "00:00"; + startAt = "22:00"; }; wu-home-xu = { method = "push"; -- cgit v1.2.3 From 5641a6ad03baccf299be6574193a37dd16e17137 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 6 Oct 2018 23:48:20 +0200 Subject: tv: add 18.09 compatibility --- tv/1systems/xu/config.nix | 1 - tv/2configs/xserver/default.nix | 3 + tv/3modules/charybdis/default.nix | 2 +- tv/5pkgs/compat/18.03/pass-otp/default.nix | 30 +++++ tv/5pkgs/compat/18.03/pass/default.nix | 121 +++++++++++++++++++++ tv/5pkgs/compat/18.03/pass/no-darwin-getopt.patch | 9 ++ tv/5pkgs/compat/18.03/pass/rofi-pass.nix | 57 ++++++++++ .../pass/set-correct-program-name-for-sleep.patch | 69 ++++++++++++ tv/5pkgs/compat/default.nix | 1 + tv/5pkgs/default.nix | 12 ++ tv/5pkgs/simple/utsushi.nix | 1 + 11 files changed, 304 insertions(+), 2 deletions(-) create mode 100644 tv/5pkgs/compat/18.03/pass-otp/default.nix create mode 100644 tv/5pkgs/compat/18.03/pass/default.nix create mode 100644 tv/5pkgs/compat/18.03/pass/no-darwin-getopt.patch create mode 100644 tv/5pkgs/compat/18.03/pass/rofi-pass.nix create mode 100644 tv/5pkgs/compat/18.03/pass/set-correct-program-name-for-sleep.patch create mode 100644 tv/5pkgs/compat/default.nix (limited to 'tv') diff --git a/tv/1systems/xu/config.nix b/tv/1systems/xu/config.nix index 24179cc3..5421cab9 100644 --- a/tv/1systems/xu/config.nix +++ b/tv/1systems/xu/config.nix @@ -41,7 +41,6 @@ with import ; mkpasswd netcat netcup - nix-repl nmap p7zip pass diff --git a/tv/2configs/xserver/default.nix b/tv/2configs/xserver/default.nix index 96c59c6a..892b7e3b 100644 --- a/tv/2configs/xserver/default.nix +++ b/tv/2configs/xserver/default.nix @@ -41,6 +41,9 @@ in { # refs desktopManager.session = mkForce []; + displayManager.lightdm.enable = mkForce false; + displayManager.job.execCmd = mkForce "derp"; + enable = true; display = 11; tty = 11; diff --git a/tv/3modules/charybdis/default.nix b/tv/3modules/charybdis/default.nix index e252f2e1..62a7037e 100644 --- a/tv/3modules/charybdis/default.nix +++ b/tv/3modules/charybdis/default.nix @@ -64,7 +64,7 @@ in { ExecStartPre = "${pkgs.coreutils}/bin/ln -s /etc/charybdis-ircd.motd /tmp/ircd.motd"; ExecStart = toString [ - "${pkgs.charybdis}/bin/charybdis-ircd" + "${pkgs.charybdis}/bin/charybdis" "-configfile ${import ./config.nix args}" "-foreground" "-logfile /dev/stderr" diff --git a/tv/5pkgs/compat/18.03/pass-otp/default.nix b/tv/5pkgs/compat/18.03/pass-otp/default.nix new file mode 100644 index 00000000..33411180 --- /dev/null +++ b/tv/5pkgs/compat/18.03/pass-otp/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, oathToolkit }: +stdenv.mkDerivation rec { + name = "pass-otp-${version}"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "tadfisher"; + repo = "pass-otp"; + rev = "v${version}"; + sha256 = "1cgj4zc8fq88n3h6c0vkv9i5al785mdprpgpbv5m22dz9p1wqvbb"; + }; + + buildInputs = [ oathToolkit ]; + + patchPhase = '' + sed -i -e 's|OATH=\$(which oathtool)|OATH=${oathToolkit}/bin/oathtool|' otp.bash + ''; + + installPhase = '' + make PREFIX=$out install + ''; + + meta = with stdenv.lib; { + description = "A pass extension for managing one-time-password (OTP) tokens"; + homepage = https://github.com/tadfisher/pass-otp; + license = licenses.gpl3; + maintainers = with maintainers; [ jwiegley tadfisher ]; + platforms = platforms.unix; + }; +} diff --git a/tv/5pkgs/compat/18.03/pass/default.nix b/tv/5pkgs/compat/18.03/pass/default.nix new file mode 100644 index 00000000..c2fe0e1d --- /dev/null +++ b/tv/5pkgs/compat/18.03/pass/default.nix @@ -0,0 +1,121 @@ +{ stdenv, lib, fetchurl, fetchFromGitHub +, coreutils, gnused, getopt, git, tree, gnupg, which, procps, qrencode +, makeWrapper + +, pass-otp + +, xclip ? null, xdotool ? null, dmenu ? null +, x11Support ? !stdenv.isDarwin +, tombPluginSupport ? false, tomb +}: + +with lib; + +assert x11Support -> xclip != null + && xdotool != null + && dmenu != null; + +let + plugins = map (p: (fetchFromGitHub { + owner = "roddhjav"; + repo = "pass-${p.name}"; + inherit (p) rev sha256; + })) + ([ + { name = "import"; + rev = "491935bd275f29ceac2b876b3a288011d1ce31e7"; + sha256 = "02mbh05ab8h7kc30hz718d1d1vkjz43b96c7p0xnd92610d2q66q"; } + { name = "update"; + rev = "cf576c9036fd18efb9ed29e0e9f811207b556fde"; + sha256 = "1hhbrg6a2walrvla6q4cd3pgrqbcrf9brzjkb748735shxfn52hd"; } + ] ++ stdenv.lib.optional tombPluginSupport { + name = "tomb"; + rev = "3368134898a42c1b758fabac625ec240e125c6be"; + sha256 = "0qqmxfg4w3r088qhlkhs44036mya82vjflsjjhw2hk8y0wd2i6ds"; } + ); + +in stdenv.mkDerivation rec { + version = "1.7.2"; + name = "password-store-${version}"; + + src = fetchurl { + url = "http://git.zx2c4.com/password-store/snapshot/${name}.tar.xz"; + sha256 = "1sl0d7nc85c6c2bmmmyb8rpmn47vhkj831l153mjlkawjvhwas27"; + }; + + patches = [ ./set-correct-program-name-for-sleep.patch + ] ++ stdenv.lib.optional stdenv.isDarwin ./no-darwin-getopt.patch; + + nativeBuildInputs = [ makeWrapper ]; + + installFlags = [ "PREFIX=$(out)" "WITH_ALLCOMP=yes" ]; + + postInstall = '' + # plugins + ${stdenv.lib.concatStringsSep "\n" (map (plugin: '' + pushd ${plugin} + PREFIX=$out make install + popd + '') plugins)} + + ln -s \ + ${pass-otp}/lib/password-store/extensions/otp.bash \ + $out/lib/password-store/extensions/ + + ln -s \ + ${pass-otp}/share/man/man1/pass-otp.1.gz \ + $out/share/man/man1/ + + # Install Emacs Mode. NOTE: We can't install the necessary + # dependencies (s.el and f.el) here. The user has to do this + # himself. + mkdir -p "$out/share/emacs/site-lisp" + cp "contrib/emacs/password-store.el" "$out/share/emacs/site-lisp/" + '' + optionalString x11Support '' + cp "contrib/dmenu/passmenu" "$out/bin/" + ''; + + wrapperPath = with stdenv.lib; makeBinPath ([ + coreutils + getopt + git + gnupg + gnused + tree + which + qrencode + ] ++ optional tombPluginSupport tomb + ++ optional stdenv.isLinux procps + ++ ifEnable x11Support [ dmenu xclip xdotool ]); + + postFixup = '' + # Fix program name in --help + substituteInPlace $out/bin/pass \ + --replace 'PROGRAM="''${0##*/}"' "PROGRAM=pass" + + # Ensure all dependencies are in PATH + wrapProgram $out/bin/pass \ + --prefix PATH : "${wrapperPath}" + '' + stdenv.lib.optionalString x11Support '' + # We just wrap passmenu with the same PATH as pass. It doesn't + # need all the tools in there but it doesn't hurt either. + wrapProgram $out/bin/passmenu \ + --prefix PATH : "$out/bin:${wrapperPath}" + ''; + + meta = with stdenv.lib; { + description = "Stores, retrieves, generates, and synchronizes passwords securely"; + homepage = https://www.passwordstore.org/; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ lovek323 the-kenny fpletz ]; + platforms = platforms.unix; + + longDescription = '' + pass is a very simple password store that keeps passwords inside gpg2 + encrypted files inside a simple directory tree residing at + ~/.password-store. The pass utility provides a series of commands for + manipulating the password store, allowing the user to add, remove, edit, + synchronize, generate, and manipulate passwords. + ''; + }; +} diff --git a/tv/5pkgs/compat/18.03/pass/no-darwin-getopt.patch b/tv/5pkgs/compat/18.03/pass/no-darwin-getopt.patch new file mode 100644 index 00000000..e8f7e138 --- /dev/null +++ b/tv/5pkgs/compat/18.03/pass/no-darwin-getopt.patch @@ -0,0 +1,9 @@ +diff -Naur password-store-1.6.5-orig/src/platform/darwin.sh password-store-1.6.5/src/platform/darwin.sh +--- password-store-1.6.5-orig/src/platform/darwin.sh 2015-01-28 16:43:02.000000000 +0000 ++++ password-store-1.6.5/src/platform/darwin.sh 2015-02-15 16:09:02.000000000 +0000 +@@ -31,5 +31,4 @@ + mount -t hfs -o noatime -o nobrowse "$DARWIN_RAMDISK_DEV" "$SECURE_TMPDIR" || die "Error: could not mount filesystem on ramdisk." + } + +-GETOPT="$(brew --prefix gnu-getopt 2>/dev/null || { which port &>/dev/null && echo /opt/local; } || echo /usr/local)/bin/getopt" + SHRED="srm -f -z" diff --git a/tv/5pkgs/compat/18.03/pass/rofi-pass.nix b/tv/5pkgs/compat/18.03/pass/rofi-pass.nix new file mode 100644 index 00000000..61f51973 --- /dev/null +++ b/tv/5pkgs/compat/18.03/pass/rofi-pass.nix @@ -0,0 +1,57 @@ +{ stdenv, fetchFromGitHub, pass, rofi, coreutils, utillinux, xdotool, gnugrep +, libnotify, pwgen, findutils, gawk, gnused, xclip, makeWrapper +}: + +stdenv.mkDerivation rec { + name = "rofi-pass-${version}"; + version = "1.5.3"; + + src = fetchFromGitHub { + owner = "carnager"; + repo = "rofi-pass"; + rev = version; + sha256 = "1fn1j2rf3abc5qb44zfc8z8ffw6rva4xfp7597hwr1g3szacazpq"; + }; + + buildInputs = [ makeWrapper ]; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + cp -a rofi-pass $out/bin/rofi-pass + + mkdir -p $out/share/doc/rofi-pass/ + cp -a config.example $out/share/doc/rofi-pass/config.example + ''; + + wrapperPath = with stdenv.lib; makeBinPath [ + coreutils + findutils + gawk + gnugrep + gnused + libnotify + pass + pwgen + rofi + utillinux + xclip + xdotool + ]; + + fixupPhase = '' + patchShebangs $out/bin + + wrapProgram $out/bin/rofi-pass \ + --prefix PATH : "${wrapperPath}" + ''; + + meta = { + description = "A script to make rofi work with password-store"; + homepage = https://github.com/carnager/rofi-pass; + maintainers = with stdenv.lib.maintainers; [ the-kenny garbas ]; + license = stdenv.lib.licenses.gpl3; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/tv/5pkgs/compat/18.03/pass/set-correct-program-name-for-sleep.patch b/tv/5pkgs/compat/18.03/pass/set-correct-program-name-for-sleep.patch new file mode 100644 index 00000000..782e06e2 --- /dev/null +++ b/tv/5pkgs/compat/18.03/pass/set-correct-program-name-for-sleep.patch @@ -0,0 +1,69 @@ +From 25b44e00ed5df8ffe2782d38ad5cd9f514379599 Mon Sep 17 00:00:00 2001 +From: "Andrew R. M" +Date: Sat, 8 Apr 2017 13:50:01 -0400 +Subject: [PATCH] Patch the clip() function to work even when using + single-binary coreutils + +--- + src/password-store.sh | 4 ++-- + src/platform/cygwin.sh | 4 ++-- + src/platform/darwin.sh | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/password-store.sh b/src/password-store.sh +index 6a4172d..4dbd6b8 100755 +--- a/src/password-store.sh ++++ b/src/password-store.sh +@@ -155,11 +155,11 @@ clip() { + # variable. Specifically, it cannot store nulls nor (non-trivally) store + # trailing new lines. + local sleep_argv0="password store sleep on display $DISPLAY" +- pkill -f "^$sleep_argv0" 2>/dev/null && sleep 0.5 ++ pkill -P $(pgrep -f "^$sleep_argv0") 2>/dev/null && sleep 0.5 + local before="$(xclip -o -selection "$X_SELECTION" 2>/dev/null | base64)" + echo -n "$1" | xclip -selection "$X_SELECTION" || die "Error: Could not copy data to the clipboard" + ( +- ( exec -a "$sleep_argv0" bash <<<"trap 'kill %1' TERM; sleep '$CLIP_TIME' & wait" ) ++ ( exec -a "$sleep_argv0" bash <(echo trap 'kill %1' TERM\; sleep "$CLIP_TIME & wait") ) + local now="$(xclip -o -selection "$X_SELECTION" | base64)" + [[ $now != $(echo -n "$1" | base64) ]] && before="$now" + +diff --git a/src/platform/cygwin.sh b/src/platform/cygwin.sh +index 6e5dd86..f3574c4 100644 +--- a/src/platform/cygwin.sh ++++ b/src/platform/cygwin.sh +@@ -3,11 +3,11 @@ + + clip() { + local sleep_argv0="password store sleep on display $DISPLAY" +- pkill -f "^$sleep_argv0" 2>/dev/null && sleep 0.5 ++ pkill -P $(pgrep -f "^$sleep_argv0") 2>/dev/null && sleep 0.5 + local before="$(base64 < /dev/clipboard)" + echo -n "$1" > /dev/clipboard + ( +- ( exec -a "$sleep_argv0" sleep "$CLIP_TIME" ) ++ ( exec -a "$sleep_argv0" bash <(echo sleep "$CLIP_TIME") ) + local now="$(base64 < /dev/clipboard)" + [[ $now != $(echo -n "$1" | base64) ]] && before="$now" + echo "$before" | base64 -d > /dev/clipboard +diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh +index 86eb325..deb04c4 100644 +--- a/src/platform/darwin.sh ++++ b/src/platform/darwin.sh +@@ -3,11 +3,11 @@ + + clip() { + local sleep_argv0="password store sleep for user $(id -u)" +- pkill -f "^$sleep_argv0" 2>/dev/null && sleep 0.5 ++ pkill -P $(pgrep -f "^$sleep_argv0") 2>/dev/null && sleep 0.5 + local before="$(pbpaste | openssl base64)" + echo -n "$1" | pbcopy + ( +- ( exec -a "$sleep_argv0" sleep "$CLIP_TIME" ) ++ ( exec -a "$sleep_argv0" bash <(echo sleep "$CLIP_TIME") ) + local now="$(pbpaste | openssl base64)" + [[ $now != $(echo -n "$1" | openssl base64) ]] && before="$now" + echo "$before" | openssl base64 -d | pbcopy +-- +2.12.2 + diff --git a/tv/5pkgs/compat/default.nix b/tv/5pkgs/compat/default.nix new file mode 100644 index 00000000..0d1e61b3 --- /dev/null +++ b/tv/5pkgs/compat/default.nix @@ -0,0 +1 @@ +self: super: {} diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index 82474ade..c5c800b5 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -33,4 +33,16 @@ foldl' mergeAttrs {} ''; gnupg = self.gnupg22; + + pass = { + "18.03" = + self.callPackage ./compat/18.03/pass { + pass-otp = self.callPackage ./compat/18.03/pass-otp {}; + }; + "18.09" = + super.pass.withExtensions (ext: [ + ext.pass-otp + ]); + }.${versions.majorMinor nixpkgsVersion}; + } diff --git a/tv/5pkgs/simple/utsushi.nix b/tv/5pkgs/simple/utsushi.nix index 518c34ca..e61dd188 100644 --- a/tv/5pkgs/simple/utsushi.nix +++ b/tv/5pkgs/simple/utsushi.nix @@ -164,6 +164,7 @@ stdenv.mkDerivation rec { ; NIX_CFLAGS_COMPILE = [ + "-Wno-error=deprecated-declarations" "-Wno-error=unused-variable" ]; -- cgit v1.2.3 From ac7e2f7ebcb29fa5fa65e08be1c6cf41f98d60a9 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 7 Oct 2018 16:37:06 +0200 Subject: tv: systemPackages += git-crypt --- tv/2configs/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tv') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 2ccab3d0..d9ddc90d 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -143,6 +143,7 @@ with import ; environment.systemPackages = [ pkgs.get pkgs.git + pkgs.git-crypt pkgs.git-preview pkgs.hashPassword pkgs.htop -- cgit v1.2.3 From dee4da76caf04cc80ba7b60d75451c581bc053f1 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 7 Oct 2018 16:37:06 +0200 Subject: tv: systemPackages += git-crypt --- tv/2configs/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tv') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 2ccab3d0..d9ddc90d 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -143,6 +143,7 @@ with import ; environment.systemPackages = [ pkgs.get pkgs.git + pkgs.git-crypt pkgs.git-preview pkgs.hashPassword pkgs.htop -- cgit v1.2.3 From ebf3fe9e21dcdbb03fb7e739c10ff087f7646cad Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 9 Oct 2018 09:35:35 +0200 Subject: tv vim: add vim-elixir --- tv/2configs/vim.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tv') diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix index 400d179d..2ac7f751 100644 --- a/tv/2configs/vim.nix +++ b/tv/2configs/vim.nix @@ -15,6 +15,7 @@ let { extra-runtimepath = concatMapStringsSep "," (pkg: "${pkg.rtp}") [ pkgs.vimPlugins.undotree + pkgs.vimPlugins.vim-elixir (pkgs.vimUtils.buildVimPlugin { name = "vim-syntax-jq"; src = pkgs.fetchgit { -- cgit v1.2.3 From 84e8732832fb21e248b100b53c0d5d7df45d0d91 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 9 Oct 2018 13:48:52 +0200 Subject: force test in krops.nix --- tv/krops.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tv') diff --git a/tv/krops.nix b/tv/krops.nix index 231486ab..e922630f 100644 --- a/tv/krops.nix +++ b/tv/krops.nix @@ -16,6 +16,7 @@ # usage: $(nix-build --no-out-link --argstr name HOSTNAME --argstr target PATH -A test) test = { target }: pkgs.krops.writeTest "tv-krops-${name}-ci" { + force = true; inherit source target; }; -- cgit v1.2.3 From 58200bf7075eeef5ab1979f1da6729fa7bbf41dd Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 11 Oct 2018 11:33:03 +0200 Subject: tv gitrepos: use proper post-receive default --- tv/2configs/gitrepos.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index a8cbe0f1..62c90d4e 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -153,7 +153,7 @@ let { public = false; hooks = hooks // { post-receive = /* sh */ '' - (${hooks.post-receive or ""}) + (${hooks.post-receive or ":"}) ${cgit-clear-cache}/bin/cgit-clear-cache ''; }; -- cgit v1.2.3