Skip to content

Commit a5bd9fc

Browse files
Merge pull request #1 from sarcasticadmin/rh/1669523451flakes
[READY] - init flake, simple slides and missing 19x content
2 parents ef75946 + c2dc6d5 commit a5bd9fc

24 files changed

Lines changed: 252 additions & 26 deletions

‎.gitattributes‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.jpg filter=lfs diff=lfs merge=lfs -text
2+
*.jpeg filter=lfs diff=lfs merge=lfs -text
3+
*.png filter=lfs diff=lfs merge=lfs -text

‎LICENSE‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2022-2023, Robert James Hernandez
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+

‎flake.lock‎

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flake.nix‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
inputs.nixpkgs.url = "nixpkgs/master";
3+
4+
outputs = flakes @ { self, nixpkgs }:
5+
let
6+
# System types to support.
7+
supportedSystems = [ "x86_64-linux" ];
8+
9+
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
10+
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
11+
12+
# Nixpkgs instantiated for supported system types.
13+
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
14+
15+
in
16+
{
17+
overlay = final: prev:
18+
with final.pkgs;
19+
{
20+
texLive = final.texlive.combine {
21+
inherit (final.texlive)
22+
scheme-small
23+
beamer
24+
# Theme reqs
25+
beamertheme-metropolis
26+
# Adding necessary fonts, specifically: phvr7t
27+
collection-fontsrecommended
28+
pgfopts
29+
multirow
30+
;
31+
};
32+
simple-slides = final.callPackage ./simple/default.nix { };
33+
openwrt-at-scale = final.callPackage ./openwrt-at-scale/default.nix { };
34+
};
35+
36+
packages = forAllSystems (system: {
37+
inherit (nixpkgsFor.${system}) simple-slides openwrt-at-scale;
38+
});
39+
40+
devShells = forAllSystems (system:
41+
let
42+
pkgs = nixpkgsFor.${system};
43+
in
44+
{
45+
default = pkgs.mkShell {
46+
buildInputs = with pkgs;[
47+
texLive
48+
rubber
49+
];
50+
};
51+
});
52+
};
53+
# Bold green prompt for `nix develop`
54+
# Had to add extra escape chars to each special char
55+
nixConfig.bash-prompt = "\\[\\033[01;32m\\][nix-flakes \\W] \$\\[\\033[00m\\] ";
56+
57+
}

‎openwrt-at-scale/default.nix‎

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,18 @@
1-
let
2-
pkgs = import <nixpkgs> {};
1+
{ texLive, rubber, stdenv, lib }:
32

4-
# https://ctan.org/ for what to combine in texlive
5-
texlive = pkgs.texlive.combine {
6-
inherit (pkgs.texlive)
7-
scheme-small
8-
beamer
9-
# Theme reqs
10-
beamertheme-metropolis
11-
pgfopts
12-
multirow
13-
;
14-
};
15-
in {
16-
slides = pkgs.stdenv.mkDerivation {
17-
name = "slides";
18-
src = ./.;
3+
stdenv.mkDerivation {
4+
pname = "openwrt-at-scale";
5+
version = "2022-09-31";
196

20-
buildInputs = [
21-
texlive
22-
pkgs.rubber
23-
];
7+
src = ./.;
248

25-
installPhase = ''
26-
mkdir -p $out
27-
cp slides.pdf $out/
28-
'';
29-
};
9+
buildInputs = [
10+
texLive
11+
rubber
12+
];
13+
14+
installPhase = ''
15+
mkdir -p $out
16+
cp slides.pdf $out/
17+
'';
3018
}
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)