Remove image and devenv stuff

This commit is contained in:
Pim Kunis 2024-12-29 22:49:54 +01:00
parent e82fb4539d
commit 433c1ef4b5
6 changed files with 4 additions and 250 deletions

View file

@ -4,19 +4,14 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flutils.url = "github:numtide/flake-utils";
nginx = {
url = "github:nginx/nginx";
flake = false;
};
};
outputs = { self, nixpkgs, flutils, nginx }: flutils.lib.eachDefaultSystem (system:
outputs = { self, nixpkgs, flutils}: flutils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
gems = pkgs.bundlerEnv {
name = "blog-pim";
name = "blog";
gemdir = ./src;
};
@ -26,32 +21,11 @@
dontUnpack = true;
installPhase = "install -Dm755 ${./patch-feed-date.py} $out/bin/patch-feed-date";
};
nginxPort = "80";
nginxConf = pkgs.writeText "nginx.conf" ''
user nobody nobody;
daemon off;
error_log /dev/stdout info;
pid /dev/null;
events {}
http {
access_log /dev/stdout;
include ${nginx.outPath}/conf/mime.types;
server {
listen ${nginxPort};
index index.html;
location / {
root ${self.packages.${system}.static-website};
}
}
}
'';
in
{
packages = {
static-website = pkgs.stdenv.mkDerivation {
name = "blog-pim";
name = "blog";
src = ./src;
sourceRoot = "src";
@ -71,28 +45,6 @@
patch-feed-date --file _site/feed.xml > $out/feed.xml
'';
};
container-image = pkgs.dockerTools.buildLayeredImage {
name = "blog-pim";
tag = "latest";
contents = [
pkgs.fakeNss
pkgs.nginx
];
extraCommands = ''
mkdir -p tmp/nginx_client_body
mkdir -p var/log/nginx
'';
config = {
Cmd = [ "nginx" "-c" nginxConf ];
ExposedPorts = {
"${nginxPort}/tcp" = { };
};
};
};
};
});
}