{"id":16337242,"url":"https://github.com/radvendii/hakyll-flakes","last_synced_at":"2025-03-20T23:31:00.957Z","repository":{"id":145291342,"uuid":"346149671","full_name":"Radvendii/hakyll-flakes","owner":"Radvendii","description":"Easy website generation with hakyll + nix flakes","archived":false,"fork":false,"pushed_at":"2024-08-12T15:05:49.000Z","size":22,"stargazers_count":17,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T11:59:02.108Z","etag":null,"topics":["flakes","hakyll","nix","website"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Radvendii.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-09T21:30:32.000Z","updated_at":"2025-01-25T21:04:41.000Z","dependencies_parsed_at":"2023-11-13T15:25:21.282Z","dependency_job_id":"3979697b-6e96-4a63-9c98-2eea6d23d265","html_url":"https://github.com/Radvendii/hakyll-flakes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Radvendii%2Fhakyll-flakes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Radvendii%2Fhakyll-flakes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Radvendii%2Fhakyll-flakes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Radvendii%2Fhakyll-flakes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Radvendii","download_url":"https://codeload.github.com/Radvendii/hakyll-flakes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244710571,"owners_count":20497265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flakes","hakyll","nix","website"],"created_at":"2024-10-10T23:46:20.438Z","updated_at":"2025-03-20T23:31:00.670Z","avatar_url":"https://github.com/Radvendii.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hakyll-flakes\n\nUse this to easily build your hakyll websites using nix flakes.\n\n`hakyll-flakes.lib.mk*` takes in a set with the following fields:\n\n- `system`: the system to build for.\n- `name`: the name of website. this must also be the name of the haskell project and executable generated.\n- `src`: the source directory (usually `./.`), which must contain at a minimum your `package.yaml` or `project-name.cabal` file.\n- `websiteBuildInputs` (optional): any runtime inputs the builder needs to build the website.\n\n`hakyll-flakes.overlay` is the overlay that `hakyll-flakes` uses internally to get hakyll working (this will not work on an arbitrary version of nixpkgs), and `hakyll-flake.pkgs` is the legacyPackages that `hakyll-flakes` uses internally (this should always work). If you want to use one consistent nixpkgs set, you can set `websiteBuildInputs = with hakyll-flakes.pkgs.${system}; [ ... ]`. Alternatively, you can use your own nixpkgs set for these inputs, there's no reason they need to be the same.\n\n# Example\n\n## `flake.nix`\n```\n{\n  description = \"My Website\";\n  inputs.nixpkgs.url = \"github:nixos/nixpkgs\";\n  inputs.hakyll-flakes.url = \"github:Radvendii/hakyll-flakes\";\n  inputs.flake-utils.url = \"github:numtide/flake-utils\";\n\n  outputs = { self, hakyll-flakes, flake-utils, nixpkgs }:\n    flake-utils.lib.eachDefaultSystem (\n      system:\n      hakyll-flakes.lib.mkAllOutputs {\n        inherit system;\n        name = \"my-website\";\n        src = ./.;\n        websiteBuildInputs = with nixpkgs.legacyPackages.${system}; [\n          rubber\n          texlive.combined.scheme-full\n          poppler_utils\n        ];\n      }\n    );\n}\n```\n\n## `package.yaml`\n```\nname: my-website\n\ndependencies:\n    - base\n    - hakyll\n    - filepath\n    - pandoc\n    - containers\n    - time\n    - pandoc-types\n    - hakyll-sass\n    - process\n    - bytestring\n    - uri-encode\n    - text\n    - time-locale-compat\n\nexecutable:\n    main: site.hs\n```\n\nThen from the top level directory you can run a few different commands:\n\n- `nix build .#website` (or just `nix build`) this goes through the whole process for you and simply produces a `result/` symlink with your compiled website inside.\n- `nix build .#builder` this builds the website *builder*, your hakyll-based `site.hs` file. `You can find it at result/bin/\u003cproject name\u003e`.\n- `nix run . -- watch` This will compile and run your website builder, creating the `_site` directory and loading the website at `localhost:8000`. It will also rebuild the website if you change the files (but not if you change `site.hs`)\n\nYou can pick out the individual outputs you want with `mkBuilderPackage`, `mkWebsitePackage`, `mkDevShell`, and `mkApp`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradvendii%2Fhakyll-flakes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradvendii%2Fhakyll-flakes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradvendii%2Fhakyll-flakes/lists"}