flake.nix: Add update script
This commit is contained in:
parent
5c537df885
commit
d142e98788
3 changed files with 86 additions and 8 deletions
29
flake.nix
29
flake.nix
|
@ -27,14 +27,27 @@
|
|||
templates = flakeOutputs.packages.${system}.tlaternet;
|
||||
};
|
||||
|
||||
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}
|
||||
'');
|
||||
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}
|
||||
'');
|
||||
};
|
||||
|
||||
update = let
|
||||
update-script = nixpkgs.legacyPackages.${system}.callPackage ./nix/update.nix {
|
||||
cargo = flakeOutputs.rust-toolchain.cargo;
|
||||
npm = nixpkgs.legacyPackages.${system}.nodePackages_latest.npm;
|
||||
npm-check-updates = self.packages.${system}.templates.dependencies.npm-check-updates;
|
||||
};
|
||||
in {
|
||||
type = "app";
|
||||
program = "${update-script}/bin/update";
|
||||
};
|
||||
};
|
||||
|
||||
nixosModules.default = import ./nix/module.nix {inherit self system;};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue