From c710e06232a3fa341854bec9b87484baed3018ec Mon Sep 17 00:00:00 2001 From: Amanda Graven Date: Sun, 27 Feb 2022 17:30:31 +0100 Subject: [PATCH 1/2] Add beanz.one to nginx and update sources --- README.md | 14 ++++++++++++++ config/hosts/grondahl/services/nginx.nix | 5 +++++ config/sources/nix/sources.json | 12 ++++++------ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 885ac1b..fbd43da 100644 --- a/README.md +++ b/README.md @@ -1 +1,15 @@ NixOS deployments using [nixus](https://github.com/Infinisil/nixus). + +First make sure you have `niv` so you can upgrade dependency versions in `sources.json`. +```sh +$ nix-shell -p niv +$ (cd config/sources && niv update) +``` +Build with: +```sh +$ nix-build deploy/ +``` +Deploy by running the generated executable. +```sh +$ ./results +``` diff --git a/config/hosts/grondahl/services/nginx.nix b/config/hosts/grondahl/services/nginx.nix index d313927..379b8b3 100644 --- a/config/hosts/grondahl/services/nginx.nix +++ b/config/hosts/grondahl/services/nginx.nix @@ -30,5 +30,10 @@ forceSSL = true; locations."/".proxyPass = "http://127.0.0.1:9000"; }; + "beanz.one" = { + locations."/" = { + root = "/var/www/beanz.one/public"; + }; + }; }; } diff --git a/config/sources/nix/sources.json b/config/sources/nix/sources.json index 32b4231..1049969 100644 --- a/config/sources/nix/sources.json +++ b/config/sources/nix/sources.json @@ -17,10 +17,10 @@ "homepage": "", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "c361b954759195c2ac085fbbed5ad7d513e1585b", - "sha256": "0grx60c7qhidnna8d5i6mq4mymwpq8rlkrl275dgchv5yfy451js", + "rev": "c3c66f6db4ac74a59eb83d83e40c10046ebc0b8c", + "sha256": "1h5x8zgmxzdj15pgssn7nihi24ni63571q75hdpsz7zxgyjw2nyh", "type": "tarball", - "url": "https://github.com/NixOS/nixos-hardware/archive/c361b954759195c2ac085fbbed5ad7d513e1585b.tar.gz", + "url": "https://github.com/NixOS/nixos-hardware/archive/c3c66f6db4ac74a59eb83d83e40c10046ebc0b8c.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { @@ -29,10 +29,10 @@ "homepage": "", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c28fb0a4671ff2715c1922719797615945e5b6a0", - "sha256": "1qzvhxcsxb6s410xlfs4ggcvm1xbbd4jrazy6cpxc1rkrxbyz0kk", + "rev": "4275a321beab5a71872fb7a5fe5da511bb2bec73", + "sha256": "1p3pn7767ifbg08nmgjd93iqk0z87z4lv29ypalj9idwd3chsm69", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/c28fb0a4671ff2715c1922719797615945e5b6a0.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/4275a321beab5a71872fb7a5fe5da511bb2bec73.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixus": { From d173ab984feab7ba7124876439b9bca7181a73e8 Mon Sep 17 00:00:00 2001 From: Amanda Graven Date: Sun, 27 Feb 2022 17:39:59 +0100 Subject: [PATCH 2/2] Enable SSL for beanz.one --- config/hosts/grondahl/services/nginx.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/hosts/grondahl/services/nginx.nix b/config/hosts/grondahl/services/nginx.nix index 379b8b3..9d2edcd 100644 --- a/config/hosts/grondahl/services/nginx.nix +++ b/config/hosts/grondahl/services/nginx.nix @@ -31,6 +31,8 @@ locations."/".proxyPass = "http://127.0.0.1:9000"; }; "beanz.one" = { + forceSSL = true; + enableACME = true; locations."/" = { root = "/var/www/beanz.one/public"; };