Tristan Daniël Maat
34fa440f52
Flake lock file updates: • Updated input 'dream2nix': 'github:nix-community/dream2nix/25be741ec92c77b8308ca6a7ab89593fe37b6542' (2022-09-16) → 'github:nix-community/dream2nix/a46b77e2243415ff5eb76b8b35277c0a9b9b072c' (2022-12-10) • Added input 'dream2nix/all-cabal-json': 'github:nix-community/all-cabal-json/d7c0434eebffb305071404edcf9d5cd99703878e' (2022-10-12) • Updated input 'dream2nix/crane': 'github:ipetkov/crane/d9f394e4e20e97c2a60c3ad82c2b6ef99be19e24' (2022-08-30) → 'github:ipetkov/crane/2243fb9c872de25cb564a02d324ea6a5b9853052' (2022-12-05) • Updated input 'dream2nix/devshell': 'github:numtide/devshell/fc7a3e3adde9bbcab68af6d1e3c6eb738e296a92' (2022-05-30) → 'github:numtide/devshell/e3dc3e21594fe07bdb24bdf1c8657acaa4cb8f66' (2022-09-17) • Added input 'dream2nix/flake-parts': 'github:hercules-ci/flake-parts/d591857e9d7dd9ddbfba0ea02b43b927c3c0f1fa' (2022-11-14) • Added input 'dream2nix/flake-parts/nixpkgs-lib': 'github:NixOS/nixpkgs/34c5293a71ffdb2fe054eb5288adc1882c1eb0b1?dir=lib' (2022-10-09) • Added input 'dream2nix/ghc-utils': 'git+https://gitlab.haskell.org/bgamari/ghc-utils?ref=refs%2fheads%2fmaster&rev=bb3a2d3dc52ff0253fb9c2812bd7aa2da03e0fea' (2022-09-10) • Added input 'dream2nix/nix-pypi-fetcher': 'github:DavHau/nix-pypi-fetcher/a9885ac6a091576b5195d547ac743d45a2a615ac' (2022-11-21) • Updated input 'dream2nix/nixpkgs': 'github:NixOS/nixpkgs/d80993b5f885515254746ba6d1917276ee386149' (2022-07-12) → 'github:NixOS/nixpkgs/f634d427b0224a5f531ea5aa10c3960ba6ec5f0f' (2022-10-12) • Updated input 'dream2nix/poetry2nix': 'github:nix-community/poetry2nix/aee8f04296c39d88155e05d25cfc59dfdd41cc77' (2021-09-30) → 'github:nix-community/poetry2nix/289efb187123656a116b915206e66852f038720e' (2022-10-28) • Updated input 'fenix': 'github:nix-community/fenix/263cd7f991c07a9592a6e825bfc37b23b00eb244' (2022-09-17) → 'github:nix-community/fenix/2745d0c04a278231140125b81996d23fe00d923c' (2022-12-10) • Updated input 'fenix/rust-analyzer-src': 'github:rust-lang/rust-analyzer/2e9f1204ca01c3e20898d4a67c8b84899d394a88' (2022-09-11) → 'github:rust-lang/rust-analyzer/14492043dba29d626ea98667c3c7c0002f75feff' (2022-12-09) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/178fea1414ae708a5704490f4c49ec3320be9815' (2022-09-15) → 'github:nixos/nixpkgs/7a6a010c3a1d00f8470a5ca888f2f927f1860a19' (2022-12-08)
74 lines
1.9 KiB
Nix
74 lines
1.9 KiB
Nix
{
|
|
description = "tlater.net web server";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
|
|
dream2nix.url = "github:nix-community/dream2nix";
|
|
|
|
fenix = {
|
|
url = "github:nix-community/fenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
dream2nix,
|
|
fenix,
|
|
}: let
|
|
# At the moment, we only deploy to x86_64-linux. Update when we
|
|
# care about another platform.
|
|
system = "x86_64-linux";
|
|
flakeOutputs = import ./nix/packages.nix {inherit nixpkgs dream2nix fenix system;};
|
|
in {
|
|
packages.${system} = {
|
|
server = flakeOutputs.server.packages.${system}.default;
|
|
templates = flakeOutputs.templates.packages.${system}.default;
|
|
};
|
|
|
|
apps.${system}.default = let
|
|
inherit (self.packages.${system}) server templates;
|
|
inherit (nixpkgs.legacyPackages.${system}) writeShellScript;
|
|
in {
|
|
type = "app";
|
|
program = builtins.toString (writeShellScript "tlaternet-webserver" ''
|
|
${server}/bin/tlaternet-webserver --template-directory ${templates}
|
|
'');
|
|
};
|
|
|
|
nixosModules.default = import ./nix/module.nix {inherit self system;};
|
|
|
|
devShells.${system} = {
|
|
templates = flakeOutputs.templates.devShells.${system}.default.overrideAttrs (old: {
|
|
buildInputs = with nixpkgs.legacyPackages.${system};
|
|
[
|
|
yj
|
|
]
|
|
++ old.buildInputs;
|
|
});
|
|
|
|
server = nixpkgs.legacyPackages.${system}.mkShell {
|
|
packages = [
|
|
(flakeOutputs.server.rust-toolchain.withComponents [
|
|
"rustc"
|
|
"cargo"
|
|
"rustfmt"
|
|
"rust-std"
|
|
"rust-docs"
|
|
"clippy"
|
|
"rust-src"
|
|
"rust-analysis"
|
|
])
|
|
fenix.packages.${system}.rust-analyzer
|
|
];
|
|
};
|
|
};
|
|
|
|
checks.${system} = import ./nix/checks {
|
|
inherit self system;
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
};
|
|
};
|
|
}
|