From 100bbf30eed6ce3ef41bcc9591240046ea50ed02 Mon Sep 17 00:00:00 2001 From: Aron Novak Date: Fri, 24 Nov 2023 10:06:10 +0100 Subject: [PATCH] deployment attempt --- Application/Migration/.gitkeep | 0 flake.nix | 30 ++++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 Application/Migration/.gitkeep diff --git a/Application/Migration/.gitkeep b/Application/Migration/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/flake.nix b/flake.nix index 078a069..9dfbcf7 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,7 @@ systems.follows = "ihp/systems"; }; - outputs = inputs@{ ihp, flake-parts, systems, ... }: + outputs = inputs@{ self, nixpkgs, ihp, flake-parts, systems, ... }: flake-parts.lib.mkFlake { inherit inputs; } { systems = import systems; @@ -35,5 +35,31 @@ }; }; + # Adding the new NixOS configuration for "ihp-app" + flake.nixosConfigurations."ihp-app" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = inputs; + modules = [ + "${nixpkgs}/nixos/modules/virtualisation/amazon-image.nix" + ihp.nixosModules.appWithPostgres + ({ ... }: { + security.acme.defaults.email = "no-reply@tpp-qa.gizra.site"; + + services.ihp = { + domain = "tpp-qa.gizra.site"; + migrations = ./Application/Migration; + schema = ./Application/Schema.sql; + fixtures = ./Application/Fixtures.sql; + sessionSecret = "M$cmzMCEx7xfL-5_q6%9cpve_0BAd5BbDaOtzhv7"; + }; + + swapDevices = [ { device = "/swapfile"; size = 8192; } ]; + + system.stateVersion = "23.05"; + }) + ]; + }; + + }; -} \ No newline at end of file +}