summaryrefslogtreecommitdiffstats
path: root/flake.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-09-09 22:11:27 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-09-09 22:11:27 +0200
commit6d6c0fccf770aa028ec219c07c1169254ab33cf7 (patch)
tree6cad64551fb8e45ecc8bf0a3cf48557fcddae642 /flake.nix
parentcontent/{,contact}: Benedikt -> Soispha (diff)
downloadb-peetz.de-6d6c0fccf770aa028ec219c07c1169254ab33cf7.zip
content/writings: Include the writings pdf in the git repository
They are not _that_ big, and it's just soo much easier than keeping their respective repositories up-to-date.
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix138
1 files changed, 31 insertions, 107 deletions
diff --git a/flake.nix b/flake.nix
index 60cc848..7b53d40 100644
--- a/flake.nix
+++ b/flake.nix
@@ -3,135 +3,59 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
- systems.url = "github:nix-systems/x86_64-linux";
- crane = {
- url = "github:ipetkov/crane";
- inputs = {};
- };
- rust-overlay = {
- url = "github:oxalica/rust-overlay";
- inputs = {
- nixpkgs.follows = "nixpkgs";
- };
- };
-
- # inputs for following
- flake-compat = {
- url = "github:edolstra/flake-compat";
- flake = false;
- };
- flake-utils = {
- url = "github:numtide/flake-utils";
- inputs = {
- systems.follows = "systems";
- };
- };
- lpm = {
- url = "git+https://codeberg.org/bpeetz/lpm.git";
- inputs = {
- systems.follows = "systems";
- rust-overlay.follows = "rust-overlay";
- nixpkgs.follows = "nixpkgs";
- crane.follows = "crane";
- flake-utils.follows = "flake-utils";
- flake-compat.follows = "flake-compat";
- };
- };
- flake_version_update = {
- url = "git+https://codeberg.org/soispha/flake_version_update.git";
- inputs = {
- systems.follows = "systems";
- nixpkgs.follows = "nixpkgs";
- flake-utils.follows = "flake-utils";
- };
- };
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
-
- # data
- essay = {
- url = "git+https://codeberg.org/bpeetz/kant_and_free_software.git";
- inputs = {
- crane.follows = "crane";
- flake-compat.follows = "flake-compat";
- flake-utils.follows = "flake-utils";
- flake_version_update.follows = "flake_version_update";
- lpm.follows = "lpm";
- nixpkgs.follows = "nixpkgs";
- rust-overlay.follows = "rust-overlay";
- systems.follows = "systems";
- };
- };
- facharbeit = {
- url = "git+https://codeberg.org/bpeetz/facharbeit.git";
- inputs = {
- crane.follows = "crane";
- flake-compat.follows = "flake-compat";
- flake-utils.follows = "flake-utils";
- flake_version_update.follows = "flake_version_update";
- lpm.follows = "lpm";
- treefmt-nix.follows = "treefmt-nix";
- nixpkgs.follows = "nixpkgs";
- rust-overlay.follows = "rust-overlay";
- systems.follows = "systems";
- };
- };
};
outputs = {
self,
- essay,
- facharbeit,
- flake-utils,
nixpkgs,
treefmt-nix,
...
- }:
- flake-utils.lib.eachDefaultSystem (
- system: let
- pkgs = nixpkgs.legacyPackages.${system};
- treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;};
+ }: let
+ system = "x86_64-linux";
+ pkgs = nixpkgs.legacyPackages.${system};
+ treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;};
- build = pkgs.callPackage ./package.nix {inherit essay facharbeit;};
- check = pkgs.stdenv.mkDerivation {
- # Add the source name, to force this to rerun.
- name = "zola-check-${./src}";
- src = ./src;
+ build = pkgs.callPackage ./package.nix {};
+ check = pkgs.stdenv.mkDerivation {
+ # Add the source name, to force this to rerun (needed because it's a FOD).
+ name = "zola-check-${./src}";
+ src = ./src;
- # Allow network access for link checking
- outputHash = "sha256-d6xi4mKdjkX2JFicDIv5niSzpyI0m/Hnm8GGAIU04kY=";
- outputHashMode = "recursive";
+ # Allow network access for link checking
+ outputHash = "sha256-d6xi4mKdjkX2JFicDIv5niSzpyI0m/Hnm8GGAIU04kY=";
+ outputHashMode = "recursive";
- # Run local
- preferLocalBuild = true;
- allowSubstitutes = false;
+ # Run local
+ preferLocalBuild = true;
+ allowSubstitutes = false;
- nativeBuildInputs = [pkgs.zola pkgs.findutils];
+ nativeBuildInputs = [pkgs.zola pkgs.findutils];
- buildPhase = ''
- zola check
- '';
+ buildPhase = ''
+ zola check
+ '';
- installPhase = "touch $out";
- };
- in {
- packages = {
- default = build;
- };
+ installPhase = "touch $out";
+ };
+ in {
+ packages."${system}" = {
+ default = build;
+ };
- checks = {
- inherit build check;
- formatting = treefmtEval.config.build.check self;
- };
+ checks."${system}" = {
+ inherit build check;
+ formatting = treefmtEval.config.build.check self;
+ };
- formatter = treefmtEval.config.build.wrapper;
- }
- );
+ formatter."${system}" = treefmtEval.config.build.wrapper;
+ };
}
# vim: ts=2