From 83e30039cf20f2547a29057fe0a7f9a24ac81194 Mon Sep 17 00:00:00 2001 From: CherryKitten Date: Wed, 22 May 2024 12:56:03 +0200 Subject: [PATCH] host website on ocelot --- flake.lock | 32 ++++++++++++++++---------------- hosts/ocelot/default.nix | 1 + hosts/ocelot/website.nix | 16 ++++++++++++++++ 3 files changed, 33 insertions(+), 16 deletions(-) create mode 100644 hosts/ocelot/website.nix diff --git a/flake.lock b/flake.lock index db566d7..8900e45 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ ] }, "locked": { - "lastModified": 1713617763, - "narHash": "sha256-788+IcjSE/bBEu+cU3s9ScG3wBSKZFWERGDtlDgwekw=", + "lastModified": 1716374277, + "narHash": "sha256-xfLyv/CtVwt/Qqklq0K5/gkc9iAaK2Fa7xaZCmFPx30=", "ref": "nix", - "rev": "eff50d0b92a0db28c350ded871b314cbb1644241", - "revCount": 33, + "rev": "b85442d733f8a1b32c5e5728259a6fc1a70c6dc3", + "revCount": 37, "type": "git", "url": "https://git.cherrykitten.dev/sammy/cherrykitten.dev" }, @@ -66,11 +66,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1714641030, - "narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=", + "lastModified": 1715865404, + "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e", + "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", "type": "github" }, "original": { @@ -119,11 +119,11 @@ ] }, "locked": { - "lastModified": 1714043624, - "narHash": "sha256-Xn2r0Jv95TswvPlvamCC46wwNo8ALjRCMBJbGykdhcM=", + "lastModified": 1715381426, + "narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=", "owner": "nix-community", "repo": "home-manager", - "rev": "86853e31dc1b62c6eeed11c667e8cdd0285d4411", + "rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4", "type": "github" }, "original": { @@ -135,11 +135,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1714531828, - "narHash": "sha256-ILsf3bdY/hNNI/Hu5bSt2/KbmHaAVhBbNUOdGztTHEg=", + "lastModified": 1716218643, + "narHash": "sha256-i/E7gzQybvcGAYDRGDl39WL6yVk30Je/NXypBz6/nmM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0638fe2715d998fa81d173aad264eb671ce2ebc1", + "rev": "a8695cbd09a7ecf3376bd62c798b9864d20f86ee", "type": "github" }, "original": { @@ -162,11 +162,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1714656196, - "narHash": "sha256-kjQkA98lMcsom6Gbhw8SYzmwrSo+2nruiTcTZp5jK7o=", + "lastModified": 1716312448, + "narHash": "sha256-PH3w5av8d+TdwCkiWN4UPBTxrD9MpxIQPDVWctlomVo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "94035b482d181af0a0f8f77823a790b256b7c3cc", + "rev": "e381a1288138aceda0ac63db32c7be545b446921", "type": "github" }, "original": { diff --git a/hosts/ocelot/default.nix b/hosts/ocelot/default.nix index 82186a7..5f54384 100644 --- a/hosts/ocelot/default.nix +++ b/hosts/ocelot/default.nix @@ -2,6 +2,7 @@ imports = [ ./gotosocial.nix ../../profiles/hcloud + ./website.nix ]; fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; }; cherrykitten.backups.enable = true; diff --git a/hosts/ocelot/website.nix b/hosts/ocelot/website.nix new file mode 100644 index 0000000..049e283 --- /dev/null +++ b/hosts/ocelot/website.nix @@ -0,0 +1,16 @@ +{ inputs, ... }: { + services.nginx = { + enable = true; + virtualHosts = { + "cherrykitten.dev" = { + forceSSL = true; + enableACME = true; + locations = { + "/" = { + root = "${inputs.cherrykitten-website.packages.x86_64-linux.website}/var/www/cherrykitten.dev"; + }; + }; + }; + }; + }; +}