refactor(luna): use blog as flake input

This commit is contained in:
Price Hiller 2023-12-03 02:17:44 -06:00
parent e61c76e3b0
commit ab0ae86a24
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
2 changed files with 16 additions and 13 deletions

View File

@ -10,17 +10,23 @@
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
personal-blog = {
url = "gitlab:blog/blog?host=gitlab.orion-technologies.io";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ { self, nixpkgs, impermanence, agenix, ... }:
let
inputs.secrets = ./secrets;
inputs.persist-dir = "/nix/persist";
specialArgs = {
secrets = ./secrets;
persist-dir = "/nix/persist";
};
defaults = {
config = {
environment.persistence = {
"${inputs.persist-dir}" = {
"${specialArgs.persist-dir}" = {
hideMounts = true;
directories = [
"/var/lib"
@ -48,8 +54,9 @@
{
nixosConfigurations.orion = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
specialArgs = specialArgs;
modules = [
{ _module.args = inputs; }
defaults
./hosts/orion
impermanence.nixosModules.impermanence
@ -58,8 +65,9 @@
};
nixosConfigurations.luna = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
specialArgs = specialArgs;
modules = [
{ _module.args = inputs; }
defaults
./hosts/luna
impermanence.nixosModules.impermanence

View File

@ -1,4 +1,4 @@
{ config, specialArgs, ... }:
{ config, pkgs, system, personal-blog, ... }:
let
blog-host = "blog.orion-technologies.io";
in
@ -15,15 +15,10 @@ in
defaults.email = "price@orion-technologies.io";
};
environment.persistence."${specialArgs.persist-dir}" = {
directories = [
"/var/www/${blog-host}"
];
};
services.nginx.virtualHosts."${blog-host}" = {
addSSL = true;
forceSSL = true;
enableACME = true;
root = "/var/www/${blog-host}";
root = personal-blog.packages.${pkgs.system}.default;
locations."/".index = "home.html";
};