this repo has no description

chore: migrate to Nix flakes

+1 -1
content/post/who-watches-watchmen-i.md
···
This blog post is already quite lengthy, so I will split it into separate parts.
There probably will be 3 of them:
-
- [Part 1 - Basics, security, and FD passing (this one)](?)
- Part 2 - Socket activation
- Part 3 - Logging
···
This blog post is already quite lengthy, so I will split it into separate parts.
There probably will be 3 of them:
+
- <a href="#top">Part 1 - Basics, security, and FD passing (this one)</a>
- Part 2 - Socket activation
- Part 3 - Logging
-22
default.nix
···
-
{ pkgs ? import <nixpkgs> {}, ... }:
-
-
with pkgs;
-
-
stdenv.mkDerivation {
-
name = "hauleth-blog";
-
src = ./.;
-
-
nativeBuildInputs = [ git ];
-
buildInputs = [ zola ];
-
-
buildPhase = ''
-
git submodule update --init --recursive --depth=1
-
zola build -o $out
-
'';
-
-
dontInstall = true;
-
-
passthru = {
-
inherit zola;
-
};
-
}
···
+41
flake.lock
···
···
+
{
+
"nodes": {
+
"flake-utils": {
+
"locked": {
+
"lastModified": 1656065134,
+
"narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
+
"type": "github"
+
},
+
"original": {
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"type": "github"
+
}
+
},
+
"nixpkgs": {
+
"locked": {
+
"lastModified": 1655567057,
+
"narHash": "sha256-Cc5hQSMsTzOHmZnYm8OSJ5RNUp22bd5NADWLHorULWQ=",
+
"owner": "NixOS",
+
"repo": "nixpkgs",
+
"rev": "e0a42267f73ea52adc061a64650fddc59906fc99",
+
"type": "github"
+
},
+
"original": {
+
"id": "nixpkgs",
+
"type": "indirect"
+
}
+
},
+
"root": {
+
"inputs": {
+
"flake-utils": "flake-utils",
+
"nixpkgs": "nixpkgs"
+
}
+
}
+
},
+
"root": "root",
+
"version": 7
+
}
+47
flake.nix
···
···
+
{
+
description = "Flake utils demo";
+
+
inputs.flake-utils.url = "github:numtide/flake-utils";
+
+
outputs = { self, nixpkgs, flake-utils }:
+
flake-utils.lib.eachDefaultSystem (system:
+
let
+
pkgs = nixpkgs.legacyPackages.${system};
+
blog = pkgs.stdenv.mkDerivation {
+
name = "hauleth-blog";
+
src = ./.;
+
+
nativeBuildInputs = [
+
pkgs.zola
+
pkgs.gitMinimal
+
];
+
+
buildPhase = ''
+
git submodule update --init --recursive --depth=1
+
zola build -o $out
+
'';
+
+
dontInstall = true;
+
+
passthru = {
+
inherit (pkgs) zola;
+
};
+
};
+
in rec {
+
packages = flake-utils.lib.flattenTree {
+
inherit blog;
+
};
+
defaultPackage = blog;
+
/* apps.hello = flake-utils.lib.mkApp { drv = packages.hello; }; */
+
/* defaultApp = apps.hello; */
+
+
devShells.default = pkgs.mkShell {
+
nativeBuildInputs = [
+
blog.zola
+
pkgs.vale
+
pkgs.mdl
+
];
+
};
+
}
+
);
+
}
-12
shell.nix
···
-
{ pkgs ? import <nixpkgs> {}, ... }:
-
-
let
-
blog = import ./. {};
-
in
-
pkgs.mkShell {
-
buildInputs = [
-
blog.zola
-
pkgs.vale
-
pkgs.mdl
-
];
-
}
···