tlaternet-webserver/flake.nix
Tristan Daniël Maat 4a099f27a2
flake.lock: Update
Flake lock file updates:

• Updated input 'dream2nix':
    'github:nix-community/dream2nix/262198033e23e9ee832f0cc8133d38f07598f555' (2023-12-13)
  → 'github:nix-community/dream2nix/1b5e01219a32324c8f6889fe1f4db933ec7932f6' (2024-06-29)
• Updated input 'dream2nix/nixpkgs':
    'github:NixOS/nixpkgs/e97b3e4186bcadf0ef1b6be22b8558eab1cdeb5d' (2023-12-11)
  → 'github:NixOS/nixpkgs/1e3deb3d8a86a870d925760db1a5adecc64d329d' (2024-06-27)
• Updated input 'fenix':
    'github:nix-community/fenix/c6d82e087ac96f24b90c5787a17e29a72566c2b4' (2023-12-31)
  → 'github:nix-community/fenix/ebfe2c639111d7e82972a12711206afaeeda2450' (2024-07-01)
• Updated input 'fenix/rust-analyzer-src':
    'github:rust-lang/rust-analyzer/e872f5085cf5b0e44558442365c1c033d486eff2' (2023-12-30)
  → 'github:rust-lang/rust-analyzer/ea7fdada6a0940b239ddbde2048a4d7dac1efe1e' (2024-06-30)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/9dd7699928e26c3c00d5d46811f1358524081062' (2023-12-30)
  → 'github:nixos/nixpkgs/7dca15289a1c2990efbe4680f0923ce14139b042' (2024-06-30)
2024-07-01 18:37:09 +02:00

81 lines
1.9 KiB
Nix

{
description = "tlater.net web server";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
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";
pkgs = nixpkgs.legacyPackages.${system};
fenixPkgs = fenix.packages.${system};
ownPkgs = self.packages.${system};
in {
packages.${system} = dream2nix.lib.importPackages {
projectRoot = ./.;
projectRootFile = "flake.nix";
packagesDir = ./packages;
packageSets = {
nixpkgs = pkgs;
fenix = fenixPkgs;
};
};
apps.${system} = {
default = let
inherit (ownPkgs) server templates;
inherit (pkgs) writeShellScript;
in {
type = "app";
program = builtins.toString (writeShellScript "tlaternet-webserver" ''
${server}/bin/tlaternet-webserver --template-directory ${templates}
'');
};
update = let
update-script = pkgs.callPackage ./nix/update.nix {inherit self;};
in {
type = "app";
program = "${update-script}/bin/update";
};
};
nixosModules.default = import ./nix/module.nix {inherit self system;};
devShells.${system} = {
server = pkgs.mkShell {
packages = [
(fenixPkgs.stable.withComponents [
"rustc"
"cargo"
"rustfmt"
"rust-std"
"rust-docs"
"clippy"
"rust-src"
"rust-analysis"
])
fenixPkgs.rust-analyzer
];
};
};
checks.${system} = import ./nix/checks {
inherit self pkgs;
};
};
}