Compare commits
No commits in common. "ec29b3c15668df4cd44406cd2f1aa95f1ea62dad" and "51d41e19d03ae7c2a50987e8a2304d2ffca80e9b" have entirely different histories.
ec29b3c156
...
51d41e19d0
332
flake.lock
332
flake.lock
|
@ -143,29 +143,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dream2nix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"ngipkgs",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"purescript-overlay": "purescript-overlay",
|
|
||||||
"pyproject-nix": "pyproject-nix"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1714329124,
|
|
||||||
"narHash": "sha256-WD0cmUjWc691xABl6Oc8MH7tdCdE9s34GjFgwZWEqLM=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "dream2nix",
|
|
||||||
"rev": "9e457e1fbdc5f3224cf6875b42205a71313a722d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "dream2nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eww": {
|
"eww": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
|
@ -223,22 +200,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_3": {
|
"flake-compat_3": {
|
||||||
"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_4": {
|
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1641205782,
|
"lastModified": 1641205782,
|
||||||
|
@ -304,17 +265,14 @@
|
||||||
},
|
},
|
||||||
"flake-utils_4": {
|
"flake-utils_4": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": [
|
"systems": "systems_3"
|
||||||
"ngipkgs",
|
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1681202837,
|
||||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -323,46 +281,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_5": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_4"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1705309234,
|
|
||||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gitignore": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"ngipkgs",
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"grasp": {
|
"grasp": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
|
@ -463,38 +381,12 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ngipkgs": {
|
|
||||||
"inputs": {
|
|
||||||
"dream2nix": "dream2nix",
|
|
||||||
"flake-utils": "flake-utils_4",
|
|
||||||
"nixpkgs": "nixpkgs",
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
|
||||||
"pre-commit-hooks": "pre-commit-hooks",
|
|
||||||
"rust-overlay": "rust-overlay",
|
|
||||||
"sops-nix": "sops-nix",
|
|
||||||
"systems": "systems_3"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1715912428,
|
|
||||||
"narHash": "sha256-LjCcGL7hTCu84mJwB9X1oS0tQ/IdBDpd8NvVJxSRrI0=",
|
|
||||||
"owner": "Chickensoupwithrice",
|
|
||||||
"repo": "ngipkgs",
|
|
||||||
"rev": "86b3c17c35f1d23e3c82245ce79ceed262dcba9f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "Chickensoupwithrice",
|
|
||||||
"ref": "aynish/atomic-server-module",
|
|
||||||
"repo": "ngipkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-matrix-appservices": {
|
"nix-matrix-appservices": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"devshell": "devshell",
|
"devshell": "devshell",
|
||||||
"flake-compat": "flake-compat_4",
|
"flake-compat": "flake-compat_3",
|
||||||
"nixlib": "nixlib",
|
"nixlib": "nixlib",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1683490239,
|
"lastModified": 1683490239,
|
||||||
|
@ -542,38 +434,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1714245158,
|
|
||||||
"narHash": "sha256-9P2M0+tf1TE7Z5PwDVwhheuD2mFf6/phPr0Jvl7cxcc=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "2b1f64b358f2cab62617f26b3870fd0ee375d848",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1714272655,
|
|
||||||
"narHash": "sha256-3/ghIWCve93ngkx5eNPdHIKJP/pMzSr5Wc4rNKE1wOc=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "12430e43bd9b81a6b4e79e64f87c624ade701eaf",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-23.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1662099760,
|
"lastModified": 1662099760,
|
||||||
"narHash": "sha256-MdZLCTJPeHi/9fg6R9fiunyDwP3XHJqDd51zWWz9px0=",
|
"narHash": "sha256-MdZLCTJPeHi/9fg6R9fiunyDwP3XHJqDd51zWWz9px0=",
|
||||||
|
@ -589,7 +449,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710420202,
|
"lastModified": 1710420202,
|
||||||
"narHash": "sha256-MvFKESbq4rUWuaf2RKPNYENaSZEw/jaCLo2gU6oREcM=",
|
"narHash": "sha256-MvFKESbq4rUWuaf2RKPNYENaSZEw/jaCLo2gU6oREcM=",
|
||||||
|
@ -641,77 +501,6 @@
|
||||||
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
|
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pre-commit-hooks": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat_3",
|
|
||||||
"flake-utils": [
|
|
||||||
"ngipkgs",
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"gitignore": "gitignore",
|
|
||||||
"nixpkgs": [
|
|
||||||
"ngipkgs",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nixpkgs-stable": [
|
|
||||||
"ngipkgs",
|
|
||||||
"nixpkgs-stable"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1713954846,
|
|
||||||
"narHash": "sha256-RWFafuSb5nkWGu8dDbW7gVb8FOQOPqmX/9MlxUUDguw=",
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "pre-commit-hooks.nix",
|
|
||||||
"rev": "6fb82e44254d6a0ece014ec423cb62d92435336f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "pre-commit-hooks.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"purescript-overlay": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"ngipkgs",
|
|
||||||
"dream2nix",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"slimlock": "slimlock"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696022621,
|
|
||||||
"narHash": "sha256-eMjFmsj2G1E0Q5XiibUNgFjTiSz0GxIeSSzzVdoN730=",
|
|
||||||
"owner": "thomashoneyman",
|
|
||||||
"repo": "purescript-overlay",
|
|
||||||
"rev": "047c7933abd6da8aa239904422e22d190ce55ead",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "thomashoneyman",
|
|
||||||
"repo": "purescript-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pyproject-nix": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1702448246,
|
|
||||||
"narHash": "sha256-hFg5s/hoJFv7tDpiGvEvXP0UfFvFEDgTdyHIjDVHu1I=",
|
|
||||||
"owner": "davhau",
|
|
||||||
"repo": "pyproject.nix",
|
|
||||||
"rev": "5a06a2697b228c04dd2f35659b4b659ca74f7aeb",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "davhau",
|
|
||||||
"ref": "dream2nix",
|
|
||||||
"repo": "pyproject.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
@ -723,13 +512,12 @@
|
||||||
"hardware": "hardware",
|
"hardware": "hardware",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"llamacpp": "llamacpp",
|
"llamacpp": "llamacpp",
|
||||||
"ngipkgs": "ngipkgs",
|
|
||||||
"nix-matrix-appservices": "nix-matrix-appservices",
|
"nix-matrix-appservices": "nix-matrix-appservices",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"poonam": "poonam",
|
"poonam": "poonam",
|
||||||
"rust-overlay": "rust-overlay_2",
|
"rust-overlay": "rust-overlay",
|
||||||
"tidalcycles": "tidalcycles",
|
"tidalcycles": "tidalcycles",
|
||||||
"unstable": "unstable",
|
"unstable": "unstable",
|
||||||
"vimwikicli": "vimwikicli"
|
"vimwikicli": "vimwikicli"
|
||||||
|
@ -737,42 +525,17 @@
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": [
|
"flake-utils": "flake-utils_4",
|
||||||
"ngipkgs",
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"ngipkgs",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1714270637,
|
|
||||||
"narHash": "sha256-sq/0YEupY9yoRpg9ft8r2sjoRo84MQipionTuk4w1YI=",
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"rev": "44f8738f4b9805f7c60118c48f85da835839311a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rust-overlay_2": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils_5",
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715912155,
|
"lastModified": 1691201768,
|
||||||
"narHash": "sha256-UXHk4dKvvm5mSuDDON3lXU5CHKiTRnIjA5mUtDOtKEU=",
|
"narHash": "sha256-h+QJMpawZoK1+8efF6UjQoY1EHZfHteXVa5OYnlqRWA=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "d3a96b08a7280a5753246129b462eed3662815d5",
|
"rev": "18ee2a71de24273e4ad4503b5604532f0b53f382",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -781,54 +544,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"slimlock": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"ngipkgs",
|
|
||||||
"dream2nix",
|
|
||||||
"purescript-overlay",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1688610262,
|
|
||||||
"narHash": "sha256-Wg0ViDotFWGWqKIQzyYCgayeH8s4U1OZcTiWTQYdAp4=",
|
|
||||||
"owner": "thomashoneyman",
|
|
||||||
"repo": "slimlock",
|
|
||||||
"rev": "b5c6cdcaf636ebbebd0a1f32520929394493f1a6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "thomashoneyman",
|
|
||||||
"repo": "slimlock",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sops-nix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"ngipkgs",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nixpkgs-stable": [
|
|
||||||
"ngipkgs",
|
|
||||||
"nixpkgs-stable"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1713892811,
|
|
||||||
"narHash": "sha256-uIGmA2xq41vVFETCF1WW4fFWFT2tqBln+aXnWrvjGRE=",
|
|
||||||
"owner": "Mic92",
|
|
||||||
"repo": "sops-nix",
|
|
||||||
"rev": "f1b0adc27265274e3b0c9b872a8f476a098679bd",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "Mic92",
|
|
||||||
"repo": "sops-nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"superdirt-src": {
|
"superdirt-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -877,21 +592,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_3": {
|
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems_4": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
@ -951,11 +651,11 @@
|
||||||
},
|
},
|
||||||
"unstable": {
|
"unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712163089,
|
"lastModified": 1704194953,
|
||||||
"narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=",
|
"narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5",
|
"rev": "bd645e8668ec6612439a9ee7e71f7eac4099d4f6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
{pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.nginx = {
|
|
||||||
enable = true;
|
|
||||||
recommendedGzipSettings = true;
|
|
||||||
recommendedOptimisation = true;
|
|
||||||
recommendedProxySettings = true;
|
|
||||||
recommendedTlsSettings = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enables MySQL
|
|
||||||
services.mysql = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.mariadb;
|
|
||||||
};
|
|
||||||
|
|
||||||
services."write.sealight.xyz".enable = true;
|
|
||||||
}
|
|
|
@ -1,148 +0,0 @@
|
||||||
{ options, lib, config, pkgs, ... }:
|
|
||||||
let
|
|
||||||
# domain for the Ghost blog
|
|
||||||
serverName = "write.sealight.xyz";
|
|
||||||
# port on which the Ghost service runs
|
|
||||||
port = 1357;
|
|
||||||
# user used to run the Ghost service
|
|
||||||
userName = builtins.replaceStrings [ "." ] [ "_" ] serverName;
|
|
||||||
# MySQL database used by Ghost
|
|
||||||
dbName = userName;
|
|
||||||
# MySQL user used by Ghost
|
|
||||||
dbUser = userName;
|
|
||||||
# directory used to save the blog content
|
|
||||||
dataDir = "/var/lib/${userName}";
|
|
||||||
# Ghost package we created in the section above
|
|
||||||
ghost = import ./ghost { inherit pkgs; };
|
|
||||||
# script that sets up the Ghost content directory
|
|
||||||
setupScript = pkgs.writeScript "${serverName}-setup.sh" ''
|
|
||||||
#! ${pkgs.stdenv.shell} -e
|
|
||||||
chmod g+s "${dataDir}"
|
|
||||||
[[ ! -d "${dataDir}/content" ]] && cp -r "${ghost}/content" "${dataDir}/content"
|
|
||||||
chown -R "${userName}":"${userName}" "${dataDir}/content"
|
|
||||||
chmod -R +w "${dataDir}/content"
|
|
||||||
ln -f -s "/etc/${serverName}.json" "${dataDir}/config.production.json"
|
|
||||||
[[ -d "${dataDir}/current" ]] && rm "${dataDir}/current"
|
|
||||||
ln -f -s "${ghost}/current" "${dataDir}/current"
|
|
||||||
[[ -d "${dataDir}/content/themes/casper" ]] && rm "${dataDir}/content/themes/casper"
|
|
||||||
ln -f -s "${ghost}/current/content/themes/casper" "${dataDir}/content/themes/casper"
|
|
||||||
'';
|
|
||||||
|
|
||||||
databaseService = "mysql.service";
|
|
||||||
|
|
||||||
serviceConfig = config.services."${serverName}";
|
|
||||||
options = { enable = lib.mkEnableOption "${serverName} service"; };
|
|
||||||
in {
|
|
||||||
options.services.${serverName} = options;
|
|
||||||
config = lib.mkIf serviceConfig.enable {
|
|
||||||
# Creates the user and group
|
|
||||||
users.users.${userName} = {
|
|
||||||
isSystemUser = true;
|
|
||||||
group = userName;
|
|
||||||
createHome = true;
|
|
||||||
home = dataDir;
|
|
||||||
};
|
|
||||||
users.groups.${userName} = { };
|
|
||||||
|
|
||||||
# Creates the Ghost config
|
|
||||||
environment.etc."${serverName}.json".text = ''
|
|
||||||
{
|
|
||||||
"url": "https://${serverName}",
|
|
||||||
"server": {
|
|
||||||
"port": ${port},
|
|
||||||
"host": "0.0.0.0"
|
|
||||||
},
|
|
||||||
"database": {
|
|
||||||
"client": "mysql",
|
|
||||||
"connection": {
|
|
||||||
"host": "localhost",
|
|
||||||
"user": "${dbUser}",
|
|
||||||
"database": "${dbName}",
|
|
||||||
"password": "",
|
|
||||||
"socketPath": "/run/mysqld/mysqld.sock"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mail": {
|
|
||||||
"transport": "sendmail"
|
|
||||||
},
|
|
||||||
"logging": {
|
|
||||||
"transports": ["stdout"]
|
|
||||||
},
|
|
||||||
"paths": {
|
|
||||||
"contentPath": "${dataDir}/content"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Sets up the Systemd service
|
|
||||||
systemd.services."${serverName}" = {
|
|
||||||
enable = true;
|
|
||||||
description = "${serverName} ghost blog";
|
|
||||||
restartIfChanged = true;
|
|
||||||
restartTriggers =
|
|
||||||
[ ghost config.environment.etc."${serverName}.json".source ];
|
|
||||||
requires = [ databaseService ];
|
|
||||||
after = [ databaseService ];
|
|
||||||
path = [ pkgs.nodejs pkgs.vips ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
User = userName;
|
|
||||||
Group = userName;
|
|
||||||
WorkingDirectory = dataDir;
|
|
||||||
# Executes the setup script before start
|
|
||||||
ExecStartPre = setupScript;
|
|
||||||
# Runs Ghost with node
|
|
||||||
ExecStart = "${pkgs.nodejs}/bin/node current/index.js";
|
|
||||||
# Sandboxes the Systemd service
|
|
||||||
AmbientCapabilities = [ ];
|
|
||||||
CapabilityBoundingSet = [ ];
|
|
||||||
KeyringMode = "private";
|
|
||||||
LockPersonality = true;
|
|
||||||
NoNewPrivileges = true;
|
|
||||||
PrivateDevices = true;
|
|
||||||
PrivateMounts = true;
|
|
||||||
PrivateTmp = true;
|
|
||||||
ProtectClock = true;
|
|
||||||
ProtectControlGroups = true;
|
|
||||||
ProtectHome = true;
|
|
||||||
ProtectHostname = true;
|
|
||||||
ProtectKernelLogs = true;
|
|
||||||
ProtectKernelModules = true;
|
|
||||||
ProtectKernelTunables = true;
|
|
||||||
ProtectSystem = "full";
|
|
||||||
RemoveIPC = true;
|
|
||||||
RestrictAddressFamilies = [ ];
|
|
||||||
RestrictNamespaces = true;
|
|
||||||
RestrictRealtime = true;
|
|
||||||
};
|
|
||||||
environment = { NODE_ENV = "production"; };
|
|
||||||
};
|
|
||||||
|
|
||||||
# Sets up the blog virtual host on NGINX
|
|
||||||
services.nginx.virtualHosts.${serverName} = {
|
|
||||||
# Sets up Lets Encrypt SSL certificates for the blog
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = { proxyPass = "http://127.0.0.1:${toString port}"; };
|
|
||||||
extraConfig = ''
|
|
||||||
charset UTF-8;
|
|
||||||
|
|
||||||
add_header Strict-Transport-Security "max-age=2592000; includeSubDomains" always;
|
|
||||||
add_header Referrer-Policy "strict-origin-when-cross-origin";
|
|
||||||
add_header X-Frame-Options "SAMEORIGIN";
|
|
||||||
add_header X-XSS-Protection "1; mode=block";
|
|
||||||
add_header X-Content-Type-Options nosniff;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Sets up MySQL database and user for Ghost
|
|
||||||
services.mysql = {
|
|
||||||
ensureDatabases = [ dbName ];
|
|
||||||
ensureUsers = [{
|
|
||||||
name = dbUser;
|
|
||||||
ensurePermissions = { "${dbName}.*" = "ALL PRIVILEGES"; };
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
source "$stdenv"/setup
|
|
||||||
|
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
npm install --loglevel=info --logs-max=0 "ghost-cli@$ghostCliVersion"
|
|
||||||
|
|
||||||
mkdir --parents "$out"/
|
|
||||||
node_modules/ghost-cli/bin/ghost install "$version" --db=sqlite3 \
|
|
||||||
--no-enable --no-prompt --no-stack --no-setup --no-start --dir "$out"
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
{ pkgs }:
|
|
||||||
|
|
||||||
let
|
|
||||||
pname = "ghost";
|
|
||||||
version = "5.8.0";
|
|
||||||
in pkgs.stdenv.mkDerivation {
|
|
||||||
inherit pname version;
|
|
||||||
buildInputs = with pkgs; [ nodejs yarn vips ];
|
|
||||||
ghostCliVersion = "1.21.1";
|
|
||||||
builder = ./builder.sh;
|
|
||||||
}
|
|
Loading…
Reference in a new issue