refactor(luna): use blog as flake input
This commit is contained in:
parent
e61c76e3b0
commit
ab0ae86a24
18
flake.nix
18
flake.nix
@ -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
|
||||
|
@ -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";
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user