From dcea597028fc88fee7721b1deb0804ea18644778 Mon Sep 17 00:00:00 2001 From: PyJaC++ Date: Mon, 30 Mar 2026 19:49:00 +0200 Subject: [PATCH] Add ngi repository and setup LiberaForms --- flake.lock | 581 ++++++++++++++++++++++++++++++++- flake.nix | 19 +- hosts/vm/sondages/sondages.nix | 8 + 3 files changed, 605 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 3674d40..39d9f7d 100644 --- a/flake.lock +++ b/flake.lock @@ -23,6 +23,33 @@ "type": "github" } }, + "buildbot-nix": { + "inputs": { + "flake-parts": "flake-parts_2", + "hercules-ci-effects": "hercules-ci-effects", + "nixpkgs": [ + "ngi", + "nixpkgs" + ], + "treefmt-nix": [ + "ngi", + "treefmt-nix" + ] + }, + "locked": { + "lastModified": 1771733760, + "narHash": "sha256-/cOjTl8VjPFFijyDLoWXXU+7lSbl8guotHOPL6OAysw=", + "owner": "nix-community", + "repo": "buildbot-nix", + "rev": "e9010d0937faf7a7b7e534e567cfd4ea5b209070", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "buildbot-nix", + "type": "github" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -45,6 +72,98 @@ "type": "github" } }, + "devshell": { + "inputs": { + "nixpkgs": [ + "ngi", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768818222, + "narHash": "sha256-460jc0+CZfyaO8+w8JNtlClB2n4ui1RbHfPTLkpwhU8=", + "owner": "numtide", + "repo": "devshell", + "rev": "255a2b1725a20d060f566e4755dbf571bbbb5f76", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "dream2nix": { + "inputs": { + "nixpkgs": [ + "ngi", + "nixpkgs" + ], + "purescript-overlay": "purescript-overlay", + "pyproject-nix": "pyproject-nix" + }, + "locked": { + "lastModified": 1765953015, + "narHash": "sha256-5FBZbbWR1Csp3Y2icfRkxMJw/a/5FGg8hCXej2//bbI=", + "owner": "nix-community", + "repo": "dream2nix", + "rev": "69eb01fa0995e1e90add49d8ca5bcba213b0416f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "dream2nix", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -63,6 +182,98 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "ngi", + "buildbot-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": [ + "ngi", + "systems" + ] + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "ngi", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "hercules-ci-effects": { + "inputs": { + "flake-parts": [ + "ngi", + "buildbot-nix", + "flake-parts" + ], + "nixpkgs": [ + "ngi", + "buildbot-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1771131391, + "narHash": "sha256-HPBNYf7HiKtBVy7/69vKpLYHX6wTcUxndxmybzDlXP8=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "0b152e0f7c5cc265a529cd63374b80e2771b207b", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -84,6 +295,89 @@ "type": "github" } }, + "mirage-opam-overlays": { + "flake": false, + "locked": { + "lastModified": 1760115982, + "narHash": "sha256-vXpXKP3fWPk1e6tiVtv1dj01mdDtRWckqSzCW62FnCU=", + "owner": "dune-universe", + "repo": "mirage-opam-overlays", + "rev": "eddcd1bc7e035392596b603d23dde67a88e6f6bc", + "type": "github" + }, + "original": { + "owner": "dune-universe", + "repo": "mirage-opam-overlays", + "type": "github" + } + }, + "ngi": { + "inputs": { + "buildbot-nix": "buildbot-nix", + "devshell": "devshell", + "dream2nix": "dream2nix", + "flake-utils": "flake-utils", + "mirage-opam-overlays": "mirage-opam-overlays", + "nix-filter": "nix-filter", + "nixdoc-to-github": "nixdoc-to-github", + "nixpkgs": [ + "nixpkgs" + ], + "opam-nix": "opam-nix", + "opam-overlays": "opam-overlays", + "opam-repository": "opam-repository", + "pre-commit-hooks": "pre-commit-hooks", + "sbt-derivation": "sbt-derivation", + "sops-nix": "sops-nix", + "systems": "systems_3", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1774868023, + "narHash": "sha256-yHS+MVsPnsJmEC6k/9DyPlZjfg0lJzflWO1kS+yGFpw=", + "owner": "ngi-nix", + "repo": "ngipkgs", + "rev": "87521192044968d7cb0d6cd463f4186dddf5f32b", + "type": "github" + }, + "original": { + "owner": "ngi-nix", + "repo": "ngipkgs", + "type": "github" + } + }, + "nix-filter": { + "locked": { + "lastModified": 1659352118, + "narHash": "sha256-X/Tdlj/PYxcQg/1hcHXxdnDr5zLO22LohIudX+oT968=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "3e1fff9ec0112fe5ec61ea7cc6d37c1720d865f8", + "type": "github" + }, + "original": { + "owner": "numtide", + "ref": "3e1fff9", + "repo": "nix-filter", + "type": "github" + } + }, + "nixdoc-to-github": { + "flake": false, + "locked": { + "lastModified": 1717409038, + "narHash": "sha256-P4ZfOrlnRPNiZwiQn2pY44nPfk9cqI7FxOVaTnZwDCI=", + "owner": "fricklerhandwerk", + "repo": "nixdoc-to-github", + "rev": "47054a3b3a0f072ecd0402de3911d0979d09a7ab", + "type": "github" + }, + "original": { + "owner": "fricklerhandwerk", + "repo": "nixdoc-to-github", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1773068389, @@ -115,12 +409,246 @@ "type": "github" } }, + "opam-nix": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": [ + "ngi", + "flake-utils" + ], + "mirage-opam-overlays": [ + "ngi", + "mirage-opam-overlays" + ], + "nixpkgs": [ + "ngi", + "nixpkgs" + ], + "opam-overlays": [ + "ngi", + "opam-overlays" + ], + "opam-repository": [ + "ngi", + "opam-repository" + ], + "opam2json": "opam2json" + }, + "locked": { + "lastModified": 1770866632, + "narHash": "sha256-OmtGtQ7YUjUXsdpfJMB5STuTqmisp1JlHX4lZEkthkU=", + "owner": "ju1m", + "repo": "opam-nix", + "rev": "963f498bef5d7d179a0e7955c218b4e87f73ba12", + "type": "github" + }, + "original": { + "owner": "ju1m", + "ref": "materialize-monorepo", + "repo": "opam-nix", + "type": "github" + } + }, + "opam-overlays": { + "flake": false, + "locked": { + "lastModified": 1765419722, + "narHash": "sha256-tjb9uZAuex5nOeFo5oRL+Z7AnXK6Of0n7s+rIotlD34=", + "owner": "dune-universe", + "repo": "opam-overlays", + "rev": "12731a6f86d7c452a94c72106fa9d3327988582d", + "type": "github" + }, + "original": { + "owner": "dune-universe", + "repo": "opam-overlays", + "type": "github" + } + }, + "opam-repository": { + "flake": false, + "locked": { + "lastModified": 1771779718, + "narHash": "sha256-+oJ0POiIxxgfhQ6ZFwVVIITu8SU+sj4HfBEbMnC9XAo=", + "owner": "ocaml", + "repo": "opam-repository", + "rev": "fc740cd2f3e80210f4eceab61f5e3de6efb44787", + "type": "github" + }, + "original": { + "owner": "ocaml", + "repo": "opam-repository", + "type": "github" + } + }, + "opam2json": { + "inputs": { + "nixpkgs": [ + "ngi", + "opam-nix", + "nixpkgs" + ], + "systems": "systems_2" + }, + "locked": { + "lastModified": 1749457947, + "narHash": "sha256-+QVm+HOYikF3wUhqSIV8qJbE/feSG+p48fgxIosbHS0=", + "owner": "tweag", + "repo": "opam2json", + "rev": "0ecd66fc2bfb25d910522c990dd36412259eac1f", + "type": "github" + }, + "original": { + "owner": "tweag", + "repo": "opam2json", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_3", + "gitignore": "gitignore", + "nixpkgs": [ + "ngi", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1770726378, + "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "purescript-overlay": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "ngi", + "dream2nix", + "nixpkgs" + ], + "slimlock": "slimlock" + }, + "locked": { + "lastModified": 1728546539, + "narHash": "sha256-Sws7w0tlnjD+Bjck1nv29NjC5DbL6nH5auL9Ex9Iz2A=", + "owner": "thomashoneyman", + "repo": "purescript-overlay", + "rev": "4ad4c15d07bd899d7346b331f377606631eb0ee4", + "type": "github" + }, + "original": { + "owner": "thomashoneyman", + "repo": "purescript-overlay", + "type": "github" + } + }, + "pyproject-nix": { + "inputs": { + "nixpkgs": [ + "ngi", + "dream2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1763017646, + "narHash": "sha256-Z+R2lveIp6Skn1VPH3taQIuMhABg1IizJd8oVdmdHsQ=", + "owner": "pyproject-nix", + "repo": "pyproject.nix", + "rev": "47bd6f296502842643078d66128f7b5e5370790c", + "type": "github" + }, + "original": { + "owner": "pyproject-nix", + "repo": "pyproject.nix", + "type": "github" + } + }, "root": { "inputs": { "agenix": "agenix", "flake-parts": "flake-parts", + "ngi": "ngi", "nixpkgs": "nixpkgs", - "treefmt-nix": "treefmt-nix" + "treefmt-nix": "treefmt-nix_2" + } + }, + "sbt-derivation": { + "inputs": { + "flake-utils": [ + "ngi", + "flake-utils" + ], + "nixpkgs": [ + "ngi", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1698464090, + "narHash": "sha256-Pnej7WZIPomYWg8f/CZ65sfW85IfIUjYhphMMg7/LT0=", + "owner": "zaninime", + "repo": "sbt-derivation", + "rev": "6762cf2c31de50efd9ff905cbcc87239995a4ef9", + "type": "github" + }, + "original": { + "owner": "zaninime", + "repo": "sbt-derivation", + "type": "github" + } + }, + "slimlock": { + "inputs": { + "nixpkgs": [ + "ngi", + "dream2nix", + "purescript-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688756706, + "narHash": "sha256-xzkkMv3neJJJ89zo3o2ojp7nFeaZc2G0fYwNXNJRFlo=", + "owner": "thomashoneyman", + "repo": "slimlock", + "rev": "cf72723f59e2340d24881fd7bf61cb113b4c407c", + "type": "github" + }, + "original": { + "owner": "thomashoneyman", + "repo": "slimlock", + "type": "github" + } + }, + "sops-nix": { + "inputs": { + "nixpkgs": [ + "ngi", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1771735105, + "narHash": "sha256-MJuVJeszZEziquykEHh/hmgIHYxUcuoG/1aowpLiSeU=", + "owner": "Mic92", + "repo": "sops-nix", + "rev": "d7755d820f5fa8acf7f223309c33e25d4f92e74f", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "sops-nix", + "type": "github" } }, "systems": { @@ -138,7 +666,58 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "ngi", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1770228511, + "narHash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "337a4fe074be1042a35086f15481d763b8ddc0e7", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nixpkgs" diff --git a/flake.nix b/flake.nix index 83bbb2d..a0488dc 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,12 @@ url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; }; + + # Ngi packages repo + ngi = { + url = "github:ngi-nix/ngipkgs"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -24,10 +30,13 @@ nixpkgs, flake-parts, agenix, + ngi, ... }: flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ inputs.treefmt-nix.flakeModule ]; + imports = [ + inputs.treefmt-nix.flakeModule + ]; systems = [ "x86_64-linux" ]; @@ -87,7 +96,13 @@ sondages = nixosSystem { specialArgs = inputs; - modules = [ ./hosts/vm/sondages ] ++ baseModules; + modules = [ + # Liberaforms + ngi.nixosModules.services.pdfding + ngi.nixosModules.services.liberaforms + + ./hosts/vm/sondages + ] ++ baseModules; }; thot = nixosSystem { diff --git a/hosts/vm/sondages/sondages.nix b/hosts/vm/sondages/sondages.nix index 04618ac..9b8d86a 100644 --- a/hosts/vm/sondages/sondages.nix +++ b/hosts/vm/sondages/sondages.nix @@ -1,4 +1,12 @@ { ... }: { + services.liberaforms = { + enable = true; + enablePostgres = true; + enableNginx = true; + domain = "sondage.crans.org"; + }; + + time.timeZone = "Europe/Paris"; }