move static files into static sub-dir, refactor nix a bit

pull/14/head
Brian Picciano 3 years ago
parent 03a35dcc38
commit f1998c321a
  1. 5
      .gitignore
  2. 21
      Makefile
  3. 6
      build.sh
  4. 39
      default.nix
  5. 9
      nix/default.nix
  6. 6
      static/.gitignore
  7. 0
      static/Gemfile
  8. 0
      static/Gemfile.lock
  9. 18
      static/Makefile
  10. 53
      static/default.nix
  11. 0
      static/gemset.nix
  12. 0
      static/pic-resize.sh
  13. 0
      static/src/404.html
  14. 0
      static/src/_config.yml
  15. 0
      static/src/_includes/footer.html
  16. 0
      static/src/_includes/head.html
  17. 0
      static/src/_includes/header.html
  18. 0
      static/src/_includes/image.html
  19. 0
      static/src/_layouts/code.html
  20. 0
      static/src/_layouts/default.html
  21. 0
      static/src/_layouts/page.html
  22. 0
      static/src/_layouts/post.html
  23. 0
      static/src/_posts/2013-04-09-erlang-tcp-socket-pull-pattern.md
  24. 0
      static/src/_posts/2013-07-11-goplus.md
  25. 0
      static/src/_posts/2013-10-08-generations.md
  26. 0
      static/src/_posts/2013-10-25-namecoind-ssl.md
  27. 0
      static/src/_posts/2014-01-11-diamond-square.md
  28. 0
      static/src/_posts/2014-10-29-erlang-pitfalls.md
  29. 0
      static/src/_posts/2015-03-11-rabbit-hole.md
  30. 0
      static/src/_posts/2015-07-15-go-http.md
  31. 0
      static/src/_posts/2015-11-21-happy-trees.md
  32. 0
      static/src/_posts/2017-09-06-brian-bars.md
  33. 0
      static/src/_posts/2018-10-25-rethinking-identity.md
  34. 0
      static/src/_posts/2018-11-12-viz-1.md
  35. 0
      static/src/_posts/2018-11-12-viz-2.md
  36. 0
      static/src/_posts/2019-08-02-program-structure-and-composability.md
  37. 0
      static/src/_posts/2020-04-26-trading-in-the-rain.md
  38. 0
      static/src/_posts/2020-05-30-denver-protests.md
  39. 0
      static/src/_posts/2020-07-07-viz-3.md
  40. 0
      static/src/_posts/2020-11-16-component-oriented-programming.md
  41. 0
      static/src/_posts/2021-01-01-new-year-new-resolution.md
  42. 0
      static/src/_posts/2021-01-09-ginger.md
  43. 0
      static/src/_posts/2021-01-14-the-web.md
  44. 0
      static/src/_posts/2021-01-23-goodbye-github-pages.md
  45. 0
      static/src/_posts/2021-01-30-building-mobile-nebula.md
  46. 0
      static/src/_posts/2021-02-06-old-code-new-ideas.md
  47. 0
      static/src/_posts/2021-02-13-building-gomobile-using-nix.md
  48. 0
      static/src/_posts/2021-02-25-married.md
  49. 0
      static/src/_posts/2021-03-01-conditionals-in-ginger.md
  50. 0
      static/src/_posts/2021-03-04-conditionals-in-ginger-errata.md
  51. 0
      static/src/_posts/2021-03-12-ripple-a-game.md
  52. 0
      static/src/_posts/2021-03-20-a-simple-rule-for-better-errors.md
  53. 0
      static/src/_posts/2021-04-01-fmail.md
  54. 0
      static/src/_posts/2021-04-06-evaluation-of-network-filesystems.md
  55. 0
      static/src/_posts/2021-04-11-ripple-v2.md
  56. 0
      static/src/_posts/2021-04-22-composing-processes-into-a-static-binary-with-nix.md
  57. 0
      static/src/_posts/2021-04-27-loops-in-ginger.md
  58. 0
      static/src/_posts/2021-05-02-nfts.md
  59. 0
      static/src/_posts/2021-05-11-ripple-v3.md
  60. 0
      static/src/_posts/2021-05-16-new-years-resolution-vibe-check.md
  61. 0
      static/src/_posts/2021-05-26-viz-4.md
  62. 0
      static/src/_posts/2021-05-28-viz-5.md
  63. 0
      static/src/_posts/2021-06-07-adventures-in-defi.md
  64. 0
      static/src/_posts/2021-06-23-viz-6.md
  65. 0
      static/src/_posts/2021-06-26-selfhosted-email-with-maddy.md
  66. 0
      static/src/_posts/2021-07-01-viz-7.md
  67. 0
      static/src/_posts/2021-07-06-maddy-vps.md
  68. 0
      static/src/_posts/2021-07-14-how-to-secure-a-webapp.md
  69. 0
      static/src/_posts/2021-07-18-radix-v4.md
  70. 0
      static/src/assets/component-oriented-design/v1/main.go
  71. 0
      static/src/assets/component-oriented-design/v1/main.md
  72. 0
      static/src/assets/component-oriented-design/v1/main_test.go
  73. 0
      static/src/assets/component-oriented-design/v1/main_test.md
  74. 0
      static/src/assets/component-oriented-design/v2/main.go
  75. 0
      static/src/assets/component-oriented-design/v2/main.md
  76. 0
      static/src/assets/component-oriented-design/v3/main.go
  77. 0
      static/src/assets/component-oriented-design/v3/main.md
  78. 0
      static/src/assets/friendly.css
  79. 0
      static/src/assets/maddy-vps/success.png
  80. 0
      static/src/assets/main.css
  81. 0
      static/src/assets/main.js
  82. 0
      static/src/assets/markov/Makefile
  83. 0
      static/src/assets/markov/Makefile.md
  84. 0
      static/src/assets/markov/markov.nix
  85. 0
      static/src/assets/markov/markov.nix.md
  86. 0
      static/src/assets/normalize.css
  87. 0
      static/src/assets/qrcode.min.js
  88. 0
      static/src/assets/skeleton.css
  89. 0
      static/src/assets/trading-in-the-rain/CW.js
  90. 0
      static/src/assets/trading-in-the-rain/Distributor.js
  91. 0
      static/src/assets/trading-in-the-rain/MIDI.js/LICENSE.txt
  92. 0
      static/src/assets/trading-in-the-rain/MIDI.js/inc/shim/Base64.js
  93. 0
      static/src/assets/trading-in-the-rain/MIDI.js/inc/shim/Base64binary.js
  94. 0
      static/src/assets/trading-in-the-rain/MIDI.js/inc/shim/WebAudioAPI.js
  95. 0
      static/src/assets/trading-in-the-rain/MIDI.js/inc/shim/WebMIDIAPI.js
  96. 0
      static/src/assets/trading-in-the-rain/MIDI.js/js/midi/audioDetect.js
  97. 0
      static/src/assets/trading-in-the-rain/MIDI.js/js/midi/gm.js
  98. 0
      static/src/assets/trading-in-the-rain/MIDI.js/js/midi/loader.js
  99. 0
      static/src/assets/trading-in-the-rain/MIDI.js/js/midi/player.js
  100. 0
      static/src/assets/trading-in-the-rain/MIDI.js/js/midi/plugin.audiotag.js
  101. Some files were not shown because too many files have changed in this diff Show More

5
.gitignore vendored

@ -1,6 +1 @@
.bundle
.sass-cache
*.gem
.jekyll-metadata
result
_site

@ -1,21 +0,0 @@
result:
nix-build -A build
install: result
nix-env -i "$$(readlink result)"
clean:
rm -f result
rm -rf _site
serve:
nix-shell -A serve
shell:
nix-shell -A shell
lock:
nix-shell -p bundler -p bundix --run 'bundler lock; bundix; rm -rf .bundle vendor'
update:
nix-shell -p bundler -p bundix --run 'bundler update; bundler lock; bundix; rm -rf .bundle vendor'

@ -1,6 +0,0 @@
source $stdenv/setup
set -e
d="$out/var/www/blog.mediocregopher.com"
mkdir -p "$d"
$jekyll_env/bin/jekyll build -s "$src" -d "$d"

@ -1,39 +0,0 @@
{
pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/cd63096d6d887d689543a0b97743d28995bc9bc3.tar.gz") {},
system ? builtins.currentSystem,
}:
let
jekyll_env = pkgs.bundlerEnv {
name = "jekyll_env";
ruby = pkgs.ruby;
gemdir = ./.;
};
shell_inputs = [ jekyll_env pkgs.imagemagick pkgs.exiftool ];
in
{
build = derivation {
inherit jekyll_env system;
name = "mediocre-blog";
builder = "${pkgs.bash}/bin/bash";
args = [ ./build.sh ];
src = ./src;
stdenv = pkgs.stdenv;
};
serve = pkgs.stdenv.mkDerivation {
name = "mediocre-blog-shell-serve";
buildInputs = shell_inputs;
shellHook = ''
exec ${jekyll_env}/bin/jekyll serve -s ./src -d ./_site -w -I -D -H 0.0.0.0
'';
};
shell = pkgs.stdenv.mkDerivation {
name = "mediocre-blog-shell";
buildInputs = shell_inputs;
};
}

@ -0,0 +1,9 @@
{
pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/d50923ab2d308a1ddb21594ba6ae064cab65d8ae.tar.gz") {},
system ? builtins.currentSystem,
}:
{
pkgs = pkgs;
system = system;
}

6
static/.gitignore vendored

@ -0,0 +1,6 @@
.bundle
.sass-cache
*.gem
.jekyll-metadata
_site
result

@ -0,0 +1,18 @@
result:
nix-build -A build
clean:
rm -f result
rm -rf _site
dev:
nix-shell -A dev
shell:
nix-shell -A shell
lock:
nix-shell -A depShell --run 'bundler lock; bundix; rm -rf .bundle vendor'
update:
nix-shell -A depShell --run 'bundler update; bundler lock; bundix; rm -rf .bundle vendor'

@ -0,0 +1,53 @@
let
utils = (import ../nix) {};
pkgs = utils.pkgs;
system = utils.system;
jekyll_env = pkgs.bundlerEnv {
name = "jekyll_env";
ruby = pkgs.ruby;
gemdir = ./.;
};
dep_inputs = [ pkgs.imagemagick pkgs.exiftool pkgs.bundler pkgs.bundix ];
all_inputs = [ jekyll_env ] ++ dep_inputs;
in
{
build = derivation {
inherit jekyll_env system;
name = "mediocre-blog-static";
builder = "${pkgs.bash}/bin/bash";
args = [
(pkgs.writeTextFile {
name = "mediocre-blog-static-buildsh";
text = ''
source ${pkgs.stdenv}/setup
set -e
mkdir -p "$out"
$jekyll_env/bin/jekyll build -s "${./src}" -d "$out"
'';
executable = true;
})
];
};
dev = pkgs.stdenv.mkDerivation {
name = "mediocre-blog-static-dev";
buildInputs = all_inputs;
shellHook = ''
exec ${jekyll_env}/bin/jekyll serve -s ./src -d ./_site -w -I -D -H 0.0.0.0
'';
};
depShell = pkgs.stdenv.mkDerivation {
name = "mediocre-blog-static-dep-shell";
buildInputs = dep_inputs;
};
shell = pkgs.stdenv.mkDerivation {
name = "mediocre-blog-static-shell";
buildInputs = all_inputs;
};
}

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save