Compare commits
6 commits
befdf9fa84
...
17a05c88db
Author | SHA1 | Date | |
---|---|---|---|
Christoph Heiss | 17a05c88db | ||
Christoph Heiss | d51b5ab8f9 | ||
Christoph Heiss | fa12895af3 | ||
Christoph Heiss | ae13670a64 | ||
Christoph Heiss | 8b45301ab9 | ||
Christoph Heiss | efef37f22f |
|
@ -1,8 +1,3 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use IO::Interactive qw(is_interactive);
|
||||
|
||||
die "hi, no interactive shell allowed here :)\n" if is_interactive();
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Archive::Tar;
|
||||
use File::Find qw(finddepth);
|
||||
use File::Temp;
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use JSON qw(from_json);
|
||||
use File::Temp;
|
||||
use File::Path qw(make_path);
|
||||
|
|
|
@ -67,7 +67,10 @@
|
|||
, sops-nix, lix-module, ... }:
|
||||
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ (import ./lib) ];
|
||||
};
|
||||
inherit (pkgs) lib;
|
||||
inherit (flake-utils.lib) mkApp;
|
||||
|
||||
|
@ -145,6 +148,7 @@
|
|||
packages = (import ./pkgs) null pkgs;
|
||||
}) // (let
|
||||
overlays = [
|
||||
(nixpkgs.lib.composeManyExtensions [ (import ./lib) ])
|
||||
(import ./pkgs)
|
||||
(self: super: {
|
||||
vimPlugins = super.vimPlugins
|
||||
|
|
31
lib/default.nix
Normal file
31
lib/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
_:
|
||||
{ lib, writeTextFile, perl, perlPackages, ... }:
|
||||
|
||||
{
|
||||
c8h4.buildPerlApplication = { name, text, perlInputs ? (_: [ ])
|
||||
, runtimeInputs ? [ ], derivationArgs ? { } }:
|
||||
writeTextFile {
|
||||
inherit name derivationArgs;
|
||||
executable = true;
|
||||
destination = "/bin/${name}";
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
${lib.getExe perlPackages.PerlCritic} $target
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
text = ''
|
||||
#!${lib.getExe (perl.withPackages perlInputs)}
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
$ENV{PATH} = "${lib.makeBinPath runtimeInputs}:$ENV{PATH}";
|
||||
|
||||
${text}
|
||||
'';
|
||||
|
||||
meta.mainProgram = name;
|
||||
};
|
||||
}
|
|
@ -1,23 +1,10 @@
|
|||
{ stdenv, perl, sudo }:
|
||||
{ c8h4, sudo }:
|
||||
|
||||
let src = ../extra/bin/automation-shell.pl;
|
||||
in stdenv.mkDerivation {
|
||||
pname = "automation-shell";
|
||||
version = "0.1";
|
||||
dontUnpack = true;
|
||||
c8h4.buildPerlApplication {
|
||||
name = "automation-shell";
|
||||
runtimeInputs = [ sudo ];
|
||||
perlInputs = p: with p; [ IOInteractive ];
|
||||
text = builtins.readFile ../extra/bin/automation-shell.pl;
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [ (perl.withPackages (p: with p; [ PerlCritic ])) ];
|
||||
checkPhase = ''
|
||||
perlcritic ${src}
|
||||
'';
|
||||
|
||||
buildInputs = [ (perl.withPackages (p: with p; [ IOInteractive ])) sudo ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin
|
||||
install -Dm755 ${src} $out/bin/automation-shell
|
||||
'';
|
||||
|
||||
passthru.shellPath = "/bin/automation-shell";
|
||||
derivationArgs.passthru.shellPath = "/bin/automation-shell";
|
||||
}
|
||||
|
|
|
@ -1,23 +1,10 @@
|
|||
{ stdenv, perl, rsync }:
|
||||
{ c8h4, rsync }:
|
||||
|
||||
let src = ../extra/bin/deploy-sink.pl;
|
||||
in stdenv.mkDerivation {
|
||||
pname = "deploy-sink";
|
||||
version = "0.1";
|
||||
dontUnpack = true;
|
||||
c8h4.buildPerlApplication {
|
||||
name = "deploy-sink";
|
||||
runtimeInputs = [ rsync ];
|
||||
perlInputs = p: with p; [ IOInteractive ];
|
||||
text = builtins.readFile ../extra/bin/deploy-sink.pl;
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [ (perl.withPackages (p: with p; [ PerlCritic ])) ];
|
||||
checkPhase = ''
|
||||
perlcritic ${src}
|
||||
'';
|
||||
|
||||
buildInputs = [ (perl.withPackages (p: with p; [ IOInteractive ])) rsync ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin
|
||||
install -Dm755 ${src} $out/bin/deploy-sink
|
||||
'';
|
||||
|
||||
passthru.shellPath = "/bin/deploy-sink";
|
||||
derivationArgs.passthru.shellPath = "/bin/deploy-sink";
|
||||
}
|
||||
|
|
|
@ -1,21 +1,8 @@
|
|||
{ stdenv, perl, notmuch }:
|
||||
{ c8h4, notmuch }:
|
||||
|
||||
let src = ../extra/bin/neomutt-export-patches.pl;
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "neomutt-export-patches";
|
||||
version = "0.1";
|
||||
dontUnpack = true;
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [ (perl.withPackages (p: with p; [ PerlCritic ])) ];
|
||||
checkPhase = ''
|
||||
perlcritic ${src}
|
||||
'';
|
||||
|
||||
buildInputs = [ (perl.withPackages (p: with p; [ IPCRun3 JSON ])) notmuch ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin
|
||||
install -Dm755 ${src} $out/bin/${pname}
|
||||
'';
|
||||
c8h4.buildPerlApplication {
|
||||
name = "neomutt-export-patches";
|
||||
runtimeInputs = [ notmuch ];
|
||||
perlInputs = p: with p; [ IPCRun3 JSON ];
|
||||
text = builtins.readFile ../extra/bin/neomutt-export-patches.pl;
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -73,24 +73,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
xdg.configFile."fontconfig/no-ligatures.conf".text = ''
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Disable ligatures for monospaced fonts</description>
|
||||
<match target="font">
|
||||
<test name="family" compare="eq" ignore-blanks="true">
|
||||
<string>Jetbrains Mono</string>
|
||||
</test>
|
||||
<edit name="fontfeatures" mode="append">
|
||||
<string>liga off</string>
|
||||
<string>dlig off</string>
|
||||
<string>calt off</string>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
||||
'';
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitFull;
|
||||
|
@ -339,6 +321,24 @@ in {
|
|||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"fontconfig/no-ligatures.conf".text = ''
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||
<fontconfig>
|
||||
<description>Disable ligatures for monospaced fonts</description>
|
||||
<match target="font">
|
||||
<test name="spacing" compare="eq" ignore-blanks="true">
|
||||
<string>100</string>
|
||||
</test>
|
||||
<edit name="fontfeatures" mode="append">
|
||||
<string>liga off</string>
|
||||
<string>dlig off</string>
|
||||
<string>calt off</string>
|
||||
<string>clig off</string>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
||||
'';
|
||||
"latexmk/latexmkrc".text = ''
|
||||
$pdf_previewer = '${pkgs.zathura}/bin/zathura';
|
||||
$latex = 'latex -interaction=nonstopmode';
|
||||
|
|
Loading…
Reference in a new issue