Compare commits
16 Commits
main
...
nixos-25.0
Author | SHA1 | Date |
---|---|---|
|
de53bfd455 | |
|
f71602bcff | |
|
1557fcbf00 | |
|
b157a5ca31 | |
|
83be7c5296 | |
|
d181eac6a3 | |
|
c1bd5b32d6 | |
|
76cbd04361 | |
|
6933e33e80 | |
|
9c6a46b398 | |
|
b33745acb8 | |
|
71af6415d2 | |
|
37050f846b | |
|
6223d67e8f | |
|
8674b22d5c | |
|
946bbc1522 |
28
flake.lock
28
flake.lock
|
@ -3,43 +3,43 @@
|
|||
"lix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1737234286,
|
||||
"narHash": "sha256-CCKIAE84dzkrnlxJCKFyffAxP3yfsOAbdvydUGqq24g=",
|
||||
"rev": "2837da71ec1588c1187d2e554719b15904a46c8b",
|
||||
"lastModified": 1751235704,
|
||||
"narHash": "sha256-J4ycLoXHPsoBoQtEXFCelL4xlq5pT8U9tNWNKm43+YI=",
|
||||
"rev": "22be6ff62626c8cdbb9cdb59a3e4bd910fedd0d6",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/2837da71ec1588c1187d2e554719b15904a46c8b.tar.gz?rev=2837da71ec1588c1187d2e554719b15904a46c8b"
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/22be6ff62626c8cdbb9cdb59a3e4bd910fedd0d6.tar.gz?rev=22be6ff62626c8cdbb9cdb59a3e4bd910fedd0d6"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/lix-project/lix/archive/2.92.0.tar.gz"
|
||||
"url": "https://git.lix.systems/lix-project/lix/archive/2.93.2.tar.gz"
|
||||
}
|
||||
},
|
||||
"lix-module": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1742943028,
|
||||
"narHash": "sha256-fprwZKE1uMzO9tiWWOrmLWBW3GPkMayQfb0xOvVFIno=",
|
||||
"rev": "868d97695bab9d21f6070b03957bcace249fbe3c",
|
||||
"lastModified": 1751240025,
|
||||
"narHash": "sha256-SXUAlxpjPRkArRMHy5+Hdi+PiC+ND9yzzIjiaHmTvQU=",
|
||||
"rev": "8b1094356f4723d6e89d3f8a95b333ee16d9ab02",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/868d97695bab9d21f6070b03957bcace249fbe3c.tar.gz?rev=868d97695bab9d21f6070b03957bcace249fbe3c"
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/8b1094356f4723d6e89d3f8a95b333ee16d9ab02.tar.gz?rev=8b1094356f4723d6e89d3f8a95b333ee16d9ab02"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-3.tar.gz"
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1748370509,
|
||||
"narHash": "sha256-QlL8slIgc16W5UaI3w7xHQEP+Qmv/6vSNTpoZrrSlbk=",
|
||||
"lastModified": 1751741127,
|
||||
"narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4faa5f5321320e49a78ae7848582f684d64783e9",
|
||||
"rev": "29e290002bfff26af1db6f64d070698019460302",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
121
flake.nix
121
flake.nix
|
@ -2,15 +2,15 @@
|
|||
description = "dragnpkgs together with nixpkgs and lix";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
|
||||
lix-module = {
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-3.tar.gz";
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.2-1.tar.gz";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
lix = {
|
||||
url = "https://git.lix.systems/lix-project/lix/archive/2.92.0.tar.gz";
|
||||
url = "https://git.lix.systems/lix-project/lix/archive/2.93.2.tar.gz";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
@ -22,6 +22,10 @@
|
|||
(import "${lix-module}/overlay.nix" { inherit lix; })
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
|
||||
libVersionInfoOverlay = import "${nixpkgs}/lib/flake-version-info.nix" nixpkgs;
|
||||
# this is taken from upstream. if upstream changes, the code here needs to be updated to match
|
||||
addLibVersionInfo = lib: lib.extend libVersionInfoOverlay;
|
||||
lib-base = addLibVersionInfo (import "${nixpkgs}/lib");
|
||||
in {
|
||||
# we don't just use nix.registry.whatever.flake = self
|
||||
# the reason for this is to be able to handle a flake.lock containing an entry for this
|
||||
|
@ -29,21 +33,54 @@
|
|||
# self reference in the registry to be downloadable by URL in case it makes it into a
|
||||
# flake.lock
|
||||
meta.registry-entry = {
|
||||
from = { id = "dragnpkgs-unstable"; type = "indirect"; };
|
||||
from = { id = "dragnpkgs"; type = "indirect"; };
|
||||
to = {
|
||||
type = "git";
|
||||
url = "https://git.lain.faith/haskal/dragnpkgs.git";
|
||||
ref = "main";
|
||||
ref = "nixos-25.05";
|
||||
} // self.lib.filterAttrs
|
||||
(n: _: n == "lastModified" || n == "rev" || n == "revCount" || n == "narHash")
|
||||
self;
|
||||
};
|
||||
|
||||
# the nix path entry for self
|
||||
meta.path-entry = "dragnpkgs-unstable=flake:dragnpkgs-unstable";
|
||||
meta.path-entry = "dragnpkgs=flake:dragnpkgs";
|
||||
|
||||
lib = nixpkgs.lib.extend (final: prev: {
|
||||
licenses = prev.licenses // { fyptl = import ./lib/licenses/fyptl.nix; };
|
||||
lib = (lib-base.extend (import ./lib/overlay.nix)).extend (final: prev: {
|
||||
# initializes regular upstream nixpkgs with the given arguments
|
||||
nixpkgs-custom = { system, ... } @ args: (
|
||||
(import "${nixpkgs}" args).extend (final: prev: {
|
||||
lib = addLibVersionInfo prev.lib;
|
||||
})
|
||||
);
|
||||
|
||||
# initializes dragnpkgs with its overlays and default config using the given arguments
|
||||
dragnpkgs-custom = { system, ... } @ args: let
|
||||
unsafeConf = if builtins.hasAttr "extraBuiltins" builtins then (
|
||||
let conf = builtins.extraBuiltins; in
|
||||
if builtins.isAttrs conf then conf else {}
|
||||
) else {};
|
||||
possiblyCommitCrimes =
|
||||
if
|
||||
builtins.hasAttr "dragnpkgs" unsafeConf &&
|
||||
builtins.isAttrs unsafeConf.dragnpkgs &&
|
||||
builtins.hasAttr "possiblyCommitCrimes" unsafeConf.dragnpkgs &&
|
||||
builtins.isBool unsafeConf.dragnpkgs.possiblyCommitCrimes
|
||||
then
|
||||
unsafeConf.dragnpkgs.possiblyCommitCrimes
|
||||
else
|
||||
false;
|
||||
in
|
||||
final.nixpkgs-custom (args // {
|
||||
overlays = overlays ++ (args.overlays or []);
|
||||
config = (args.config or {}) // {
|
||||
allowlistedLicenses = (final.optionals
|
||||
possiblyCommitCrimes
|
||||
[ final.licenses.fyptl ]) ++ (args.config.allowlistedLicenses or []);
|
||||
};
|
||||
});
|
||||
|
||||
nixos = import "${nixpkgs}/nixos/lib" { lib = final; };
|
||||
|
||||
nixosSystem = args:
|
||||
import "${nixpkgs}/nixos/lib/eval-config.nix" (
|
||||
|
@ -122,17 +159,17 @@
|
|||
};
|
||||
};
|
||||
|
||||
config.nix.registry.dragnpkgs-unstable =
|
||||
config.nix.registry.dragnpkgs =
|
||||
lib.mkIf config.dragnpkgs.setFlakeRegistry self.meta.registry-entry;
|
||||
|
||||
config.nix.registry.nixpkgs = lib.mkIf config.dragnpkgs.setNixpkgsFlakeAlias {
|
||||
from = { id = "nixpkgs"; type = "indirect"; };
|
||||
to = { id = "dragnpkgs-unstable"; type = "indirect"; };
|
||||
to = { id = "dragnpkgs"; type = "indirect"; };
|
||||
};
|
||||
|
||||
config.nix.registry.templates = lib.mkIf config.dragnpkgs.setTemplatesFlakeAlias {
|
||||
from = { id = "templates"; type = "indirect"; };
|
||||
to = { id = "dragnpkgs-unstable"; type = "indirect"; };
|
||||
to = { id = "dragnpkgs"; type = "indirect"; };
|
||||
};
|
||||
|
||||
config.nix.nixPath = lib.mkIf config.dragnpkgs.setNixPath [
|
||||
|
@ -153,18 +190,19 @@
|
|||
lib.mkForce "/etc/nix/extra-builtins.nix"
|
||||
);
|
||||
|
||||
config.environment.etc."nix/extra-builtins.nix".text =
|
||||
lib.mkIf config.dragnpkgs.possiblyCommitCrimes (
|
||||
let
|
||||
possiblyCommitCrimes =
|
||||
lib.boolToString config.dragnpkgs.possiblyCommitCrimes;
|
||||
in ''
|
||||
{ ... }: {
|
||||
dragnpkgs = {
|
||||
possiblyCommitCrimes = ${possiblyCommitCrimes};
|
||||
};
|
||||
}
|
||||
'');
|
||||
config.environment.etc = lib.mkIf config.dragnpkgs.possiblyCommitCrimes {
|
||||
"nix/extra-builtins.nix".text =
|
||||
let
|
||||
possiblyCommitCrimes =
|
||||
lib.boolToString config.dragnpkgs.possiblyCommitCrimes;
|
||||
in ''
|
||||
{ ... }: {
|
||||
dragnpkgs = {
|
||||
possiblyCommitCrimes = ${possiblyCommitCrimes};
|
||||
};
|
||||
}
|
||||
'';
|
||||
};
|
||||
})
|
||||
|
||||
(import ./module.nix)
|
||||
|
@ -184,7 +222,8 @@
|
|||
));
|
||||
in
|
||||
builtins.mapAttrs (name: value:
|
||||
if name == "packages" || name == "legacyPackages" || name == "devShells" then
|
||||
if name == "packages" || name == "legacyPackages" || name == "devShells" ||
|
||||
name == "apps" then
|
||||
rewritePerSystem value
|
||||
else
|
||||
value
|
||||
|
@ -192,41 +231,19 @@
|
|||
});
|
||||
|
||||
legacyPackages = forAllSystems (system:
|
||||
let
|
||||
unsafeConf = if builtins.hasAttr "extraBuiltins" builtins then (
|
||||
let conf = builtins.extraBuiltins; in
|
||||
if builtins.isAttrs conf then conf else {}
|
||||
) else {};
|
||||
possiblyCommitCrimes =
|
||||
if
|
||||
builtins.hasAttr "dragnpkgs" unsafeConf &&
|
||||
builtins.isAttrs unsafeConf.dragnpkgs &&
|
||||
builtins.hasAttr "possiblyCommitCrimes" unsafeConf.dragnpkgs &&
|
||||
builtins.isBool unsafeConf.dragnpkgs.possiblyCommitCrimes
|
||||
then
|
||||
unsafeConf.dragnpkgs.possiblyCommitCrimes
|
||||
else
|
||||
false;
|
||||
in
|
||||
nixpkgs.legacyPackages.${system}.appendOverlays (overlays ++
|
||||
[(final: prev: {
|
||||
stdenv = prev.stdenv.override {
|
||||
config = prev.config // {
|
||||
allowlistedLicenses = final.lib.optionals
|
||||
possiblyCommitCrimes
|
||||
[ final.lib.licenses.fyptl ];
|
||||
};
|
||||
};
|
||||
})])
|
||||
self.lib.dragnpkgs-custom { inherit system; }
|
||||
);
|
||||
|
||||
nixosModules = nixpkgs.nixosModules;
|
||||
|
||||
templates = {
|
||||
default = {
|
||||
path = ./templates/default;
|
||||
description = "A very basic flake (with dragnpkgs)";
|
||||
};
|
||||
|
||||
beamer = {
|
||||
path = ./templates/beamer;
|
||||
description = "A very basic presentation with Beamer";
|
||||
};
|
||||
};
|
||||
|
||||
defaultTemplate = self.templates.default;
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
final: prev: {
|
||||
licenses = prev.licenses // { fyptl = import ./licenses/fyptl.nix; };
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
# set some nix settings defaults
|
||||
config.nix.settings = {
|
||||
repl-overlays = [ ./repl-overlay.nix ];
|
||||
experimental-features = "nix-command flakes repl-flake pipe-operator";
|
||||
experimental-features = "nix-command flakes pipe-operator";
|
||||
temp-dir = "/var/tmp";
|
||||
|
||||
# we're disabling the default flake registry because i don't like it
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
final: prev: {
|
||||
lib = prev.lib.extend (lfinal: lprev: {
|
||||
licenses = lprev.licenses // { fyptl = import ./lib/licenses/fyptl.nix; };
|
||||
});
|
||||
lib = prev.lib.extend (import ./lib/overlay.nix);
|
||||
|
||||
fetchFromSteam = prev.callPackage ./lib/fetchsteam {};
|
||||
fetchb4 = prev.callPackage ./lib/fetchb4 {};
|
||||
|
@ -58,4 +56,8 @@ final: prev: {
|
|||
pympress = prev.pympress.overrideDerivation (oldAttrs: {
|
||||
patches = [ ./pkgs/python/pympress/0001-Fix-KDE-window-icon.patch ];
|
||||
});
|
||||
|
||||
texliveDragonPackages = {
|
||||
moloch = prev.callPackage ./pkgs/tex/moloch {};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 10a24d7831f51549d8c05193a0fbc329cc327fbe Mon Sep 17 00:00:00 2001
|
||||
From d9e022548aff94e90914baa921ddb4cd939c0e5c Mon Sep 17 00:00:00 2001
|
||||
From: xenia <xenia@awoo.systems>
|
||||
Date: Sat, 21 Dec 2024 15:33:10 -0500
|
||||
Subject: [PATCH] implement lix support
|
||||
|
||||
---
|
||||
CMakeLists.txt | 27 -------------
|
||||
extra-builtins.cc | 87 ++++++++++++++++-------------------------
|
||||
meson.build | 18 +++++++++
|
||||
CMakeLists.txt | 27 ------------
|
||||
extra-builtins.cc | 91 ++++++++++++++++-------------------------
|
||||
meson.build | 18 ++++++++
|
||||
nix-plugins-config.h.in | 3 --
|
||||
4 files changed, 51 insertions(+), 84 deletions(-)
|
||||
4 files changed, 53 insertions(+), 86 deletions(-)
|
||||
delete mode 100644 CMakeLists.txt
|
||||
create mode 100644 meson.build
|
||||
delete mode 100644 nix-plugins-config.h.in
|
||||
|
@ -47,7 +47,7 @@ index 9674fe8..0000000
|
|||
-
|
||||
-install(TARGETS nix-extra-builtins DESTINATION lib/nix/plugins)
|
||||
diff --git a/extra-builtins.cc b/extra-builtins.cc
|
||||
index 3a0f90e..f2978f8 100644
|
||||
index 3a0f90e..95aef5e 100644
|
||||
--- a/extra-builtins.cc
|
||||
+++ b/extra-builtins.cc
|
||||
@@ -1,12 +1,8 @@
|
||||
|
@ -68,8 +68,12 @@ index 3a0f90e..f2978f8 100644
|
|||
|
||||
using namespace nix;
|
||||
|
||||
@@ -24,39 +20,38 @@ static GlobalConfig::Register rp(&extraBuiltinsSettings);
|
||||
static void extraBuiltins(EvalState & state, const PosIdx pos,
|
||||
@@ -21,42 +17,41 @@ static ExtraBuiltinsSettings extraBuiltinsSettings;
|
||||
|
||||
static GlobalConfig::Register rp(&extraBuiltinsSettings);
|
||||
|
||||
-static void extraBuiltins(EvalState & state, const PosIdx pos,
|
||||
+static void extraBuiltins(EvalState & state,
|
||||
Value ** _args, Value & v)
|
||||
{
|
||||
- static auto extraBuiltinsFile = state.rootPath(CanonPath(extraBuiltinsSettings.extraBuiltinsFile.to_string()));
|
||||
|
@ -130,8 +134,9 @@ index 3a0f90e..f2978f8 100644
|
|||
+ Value* arg = state.ctx.mem.allocValue();
|
||||
+ arg->mkAttrs(attrs);
|
||||
v.mkApp(fun, arg);
|
||||
state.forceValue(v, pos);
|
||||
- state.forceValue(v, pos);
|
||||
- } catch (FileNotFound &) {
|
||||
+ state.forceValue(v, noPos);
|
||||
+ } catch (SysError &) {
|
||||
v.mkNull();
|
||||
}
|
||||
|
@ -190,5 +195,5 @@ index 459fea8..0000000
|
|||
-#define NIX_CFLAGS_OTHER "@NIX_CFLAGS_OTHER@"
|
||||
-#define BOOST_INCLUDE_DIR "@BOOST_INCLUDE_DIR@"
|
||||
--
|
||||
2.47.2
|
||||
2.49.0
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
buildInputs = [
|
||||
lix
|
||||
boost182
|
||||
(lix.capnproto-lix)
|
||||
];
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
|
|||
hash = "sha256-orvXNhM1WKlJ6j5Nuap0kZarydcujoEmF+OrdX7iFmA=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-7/SP+drJWg2c4bsd3d4ge8E9BJZykbWfjgC2lSJhqas=";
|
||||
cargoHash = "sha256-m8lXHfj6W/qltK+WrT0rE0gDNvvhghcXkeiX3Slx9X8=";
|
||||
|
||||
meta = {
|
||||
description = "A firmware base address search tool";
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
{
|
||||
fetchFromGitea,
|
||||
writeShellScript,
|
||||
writableTmpDirAsHomeHook,
|
||||
|
||||
stdenvNoCC,
|
||||
|
||||
texlivePackages,
|
||||
texliveBasic,
|
||||
}:
|
||||
let
|
||||
texEnv = texliveBasic.withPackages (ps: with ps; [
|
||||
# l3build
|
||||
beamer
|
||||
biblatex
|
||||
enumitem
|
||||
fileinfo
|
||||
hypdoc
|
||||
hyperref
|
||||
listings
|
||||
metalogo
|
||||
parskip
|
||||
pgf
|
||||
pgfopts
|
||||
setspace
|
||||
xurl
|
||||
microtype
|
||||
|
||||
latexmk
|
||||
]);
|
||||
in stdenvNoCC.mkDerivation rec {
|
||||
pname = "moloch";
|
||||
version = "1.0.2-DEV-xenia";
|
||||
|
||||
outputs = [
|
||||
"tex"
|
||||
"texdoc"
|
||||
];
|
||||
|
||||
passthru.tlDeps = with texlivePackages; [ latex ];
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "git.lain.faith";
|
||||
owner = "haskal";
|
||||
repo = "${pname}-dragon";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-eMlhJj4a2HTDhDzkS9KR+d76lt81iH7x//WZOA39tno=";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
texEnv
|
||||
|
||||
# multiple-outputs.sh fails if $out is not defined
|
||||
(writeShellScript "force-tex-output.sh" ''
|
||||
out="''${tex-}"
|
||||
'')
|
||||
|
||||
writableTmpDirAsHomeHook # Need a writable $HOME for latexmk
|
||||
];
|
||||
|
||||
# we just build manually, but moloch's own method of building is using l3build
|
||||
# i have no idea how to get that working, so for now just do it normal style
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
# Generate the style files
|
||||
cd src
|
||||
latex beamertheme${pname}.ins
|
||||
|
||||
# Generate the documentation
|
||||
cp ../doc/${pname}.tex .
|
||||
latexmk -pdf ${pname}.tex
|
||||
|
||||
cd ..
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
path="$tex/tex/latex/${pname}"
|
||||
mkdir -p "$path"
|
||||
cp src/*.{cls,def,clo,sty} "$path/"
|
||||
|
||||
path="$texdoc/doc/tex/latex/${pname}"
|
||||
mkdir -p "$path"
|
||||
cp src/${pname}.pdf "$path/"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
use flake
|
|
@ -0,0 +1,16 @@
|
|||
/my-beamer-presentation.pdf
|
||||
|
||||
*.aux
|
||||
*.fdb_latexmk
|
||||
*.fls
|
||||
*.log
|
||||
*.nav
|
||||
*.out
|
||||
*.snm
|
||||
*.synctex.gz
|
||||
*.toc
|
||||
|
||||
result
|
||||
result-tex
|
||||
|
||||
.direnv
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
description = "A very basic presentation with Beamer";
|
||||
|
||||
outputs = { self, dragnpkgs } @ inputs: dragnpkgs.lib.mkFlake {
|
||||
# Define a texlive environment to use
|
||||
packages.texlive-custom = { texliveMedium, texliveDragonPackages }:
|
||||
texliveMedium.withPackages (ps: with ps; [
|
||||
fontawesome5
|
||||
texliveDragonPackages.moloch
|
||||
]);
|
||||
|
||||
# Package definition for building the PDF
|
||||
packages.default = { system, stdenvNoCC }: stdenvNoCC.mkDerivation rec {
|
||||
pname = "my-beamer-presentation";
|
||||
|
||||
name = "${pname}.pdf";
|
||||
|
||||
nativeBuildInputs = [
|
||||
self.packages.${system}.texlive-custom
|
||||
];
|
||||
|
||||
src = self;
|
||||
|
||||
buildPhase = ''
|
||||
latexmk -pdf ${pname}.tex
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cp ${pname}.pdf $out
|
||||
'';
|
||||
};
|
||||
|
||||
# Runnable package (ie `nix run`) to start the presentation
|
||||
apps.default = { lib, system, writeShellScript, pympress }: {
|
||||
type = "app";
|
||||
program = "${writeShellScript "start-presentation" ''
|
||||
exec ${lib.getExe pympress} ${self.packages.${system}.default}
|
||||
''}";
|
||||
};
|
||||
|
||||
# Devshell definition to expose the texlive environment to eg nvim
|
||||
devShells.default = { mkShell, system }: mkShell {
|
||||
packages = [ self.packages.${system}.texlive-custom ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
\documentclass[aspectratio=169]{beamer}
|
||||
\usepackage[english]{babel}
|
||||
\usepackage{fontawesome5}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{arrows,calc,fit,positioning}
|
||||
|
||||
|
||||
\usetheme{moloch}
|
||||
\usefonttheme[onlymath]{serif}
|
||||
|
||||
|
||||
% this can be commented out to produce a slide deck with no notes
|
||||
\setbeameroption{show notes}
|
||||
|
||||
|
||||
% useful tikz styles from previous slide decks
|
||||
\tikzset{%
|
||||
icon/.value required,
|
||||
icon/.style={%
|
||||
node contents={\faIcon{#1}},
|
||||
icon size=normal,
|
||||
},
|
||||
icon size/.is choice,
|
||||
icon size/.default=normal,
|
||||
icon size/normal/.style={%
|
||||
font={\fontsize{20.74}{20.74}\selectfont}
|
||||
},
|
||||
icon size/small/.style={%
|
||||
font={\fontsize{12}{12}\selectfont}
|
||||
},
|
||||
rounded box/.style={%
|
||||
inner sep=0.3em,
|
||||
draw,
|
||||
rounded corners,
|
||||
line width=0.1em
|
||||
},
|
||||
sequence diagram/.style={%
|
||||
font=\small,
|
||||
line width=1pt,
|
||||
sequence/.style={%
|
||||
every to/.style={%
|
||||
to path={(\tikztostart) -- (\tikztostart -| \tikztotarget) \tikztonodes} % chktex 1 chktex 8
|
||||
},
|
||||
->/.style={-stealth,every node/.style={above}},
|
||||
<-/.style={stealth-,every node/.style={below}},
|
||||
},
|
||||
note/.style={%
|
||||
color=example text.fg,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
\title{My Beamer Presentation}
|
||||
\subtitle{(From the template)}
|
||||
\author{You}
|
||||
\institute{Institute of Swag Nix Templates}
|
||||
\date{Now}
|
||||
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\section{My Section}
|
||||
\subsection{My Subsection}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Some Slide Title}
|
||||
|
||||
Sample text
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Some Other Slide Title}
|
||||
|
||||
Sample text 2
|
||||
\end{frame}
|
||||
|
||||
|
||||
\appendix
|
||||
|
||||
\begin{frame}[standout]
|
||||
Backup Slides
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Backup slide 1}
|
||||
|
||||
Some backup slide content
|
||||
\end{frame}
|
||||
|
||||
\end{document}
|
Loading…
Reference in New Issue