My personal blog hauleth.dev
blog
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: migrate to Nix flakes

+89 -35
+1 -1
content/post/who-watches-watchmen-i.md
··· 508 508 This blog post is already quite lengthy, so I will split it into separate parts. 509 509 There probably will be 3 of them: 510 510 511 - - [Part 1 - Basics, security, and FD passing (this one)](?) 511 + - <a href="#top">Part 1 - Basics, security, and FD passing (this one)</a> 512 512 - Part 2 - Socket activation 513 513 - Part 3 - Logging
-22
default.nix
··· 1 - { pkgs ? import <nixpkgs> {}, ... }: 2 - 3 - with pkgs; 4 - 5 - stdenv.mkDerivation { 6 - name = "hauleth-blog"; 7 - src = ./.; 8 - 9 - nativeBuildInputs = [ git ]; 10 - buildInputs = [ zola ]; 11 - 12 - buildPhase = '' 13 - git submodule update --init --recursive --depth=1 14 - zola build -o $out 15 - ''; 16 - 17 - dontInstall = true; 18 - 19 - passthru = { 20 - inherit zola; 21 - }; 22 - }
+41
flake.lock
··· 1 + { 2 + "nodes": { 3 + "flake-utils": { 4 + "locked": { 5 + "lastModified": 1656065134, 6 + "narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=", 7 + "owner": "numtide", 8 + "repo": "flake-utils", 9 + "rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "numtide", 14 + "repo": "flake-utils", 15 + "type": "github" 16 + } 17 + }, 18 + "nixpkgs": { 19 + "locked": { 20 + "lastModified": 1655567057, 21 + "narHash": "sha256-Cc5hQSMsTzOHmZnYm8OSJ5RNUp22bd5NADWLHorULWQ=", 22 + "owner": "NixOS", 23 + "repo": "nixpkgs", 24 + "rev": "e0a42267f73ea52adc061a64650fddc59906fc99", 25 + "type": "github" 26 + }, 27 + "original": { 28 + "id": "nixpkgs", 29 + "type": "indirect" 30 + } 31 + }, 32 + "root": { 33 + "inputs": { 34 + "flake-utils": "flake-utils", 35 + "nixpkgs": "nixpkgs" 36 + } 37 + } 38 + }, 39 + "root": "root", 40 + "version": 7 41 + }
+47
flake.nix
··· 1 + { 2 + description = "Flake utils demo"; 3 + 4 + inputs.flake-utils.url = "github:numtide/flake-utils"; 5 + 6 + outputs = { self, nixpkgs, flake-utils }: 7 + flake-utils.lib.eachDefaultSystem (system: 8 + let 9 + pkgs = nixpkgs.legacyPackages.${system}; 10 + blog = pkgs.stdenv.mkDerivation { 11 + name = "hauleth-blog"; 12 + src = ./.; 13 + 14 + nativeBuildInputs = [ 15 + pkgs.zola 16 + pkgs.gitMinimal 17 + ]; 18 + 19 + buildPhase = '' 20 + git submodule update --init --recursive --depth=1 21 + zola build -o $out 22 + ''; 23 + 24 + dontInstall = true; 25 + 26 + passthru = { 27 + inherit (pkgs) zola; 28 + }; 29 + }; 30 + in rec { 31 + packages = flake-utils.lib.flattenTree { 32 + inherit blog; 33 + }; 34 + defaultPackage = blog; 35 + /* apps.hello = flake-utils.lib.mkApp { drv = packages.hello; }; */ 36 + /* defaultApp = apps.hello; */ 37 + 38 + devShells.default = pkgs.mkShell { 39 + nativeBuildInputs = [ 40 + blog.zola 41 + pkgs.vale 42 + pkgs.mdl 43 + ]; 44 + }; 45 + } 46 + ); 47 + }
-12
shell.nix
··· 1 - { pkgs ? import <nixpkgs> {}, ... }: 2 - 3 - let 4 - blog = import ./. {}; 5 - in 6 - pkgs.mkShell { 7 - buildInputs = [ 8 - blog.zola 9 - pkgs.vale 10 - pkgs.mdl 11 - ]; 12 - }