Refactor shared configuration and update LNBits service for improved domain handling
Updated shared.nix to enhance domain parameter propagation and modified configuration.nix to utilize the inherited domain for machine-specific setups. Adjusted example-service.nix to accept the domain as an argument, improving modularity. Additionally, added a new documentation file explaining the LNBits flake deployment process, detailing architecture, key components, and deployment instructions for better onboarding and understanding of the system.
This commit is contained in:
parent
ca5b78b561
commit
30a1ae28f7
4 changed files with 273 additions and 8 deletions
|
|
@ -1,13 +1,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
domain = "example.com";
|
||||
in
|
||||
{
|
||||
# Import shared configuration and machine-specific modules
|
||||
imports = [
|
||||
# Import shared.nix with your domain parameter
|
||||
# Replace "example.com" with your actual domain
|
||||
{ _module.args = { inherit domain; }; }
|
||||
(import /var/src/config-shared {
|
||||
inherit config pkgs;
|
||||
domain = "example.com";
|
||||
inherit config pkgs domain;
|
||||
})
|
||||
|
||||
# Import hardware-specific configuration
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, domain, ... }:
|
||||
|
||||
{
|
||||
# Example: WireGuard VPN Service
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
# Note: 'domain' is made available via _module.args in the machine's configuration.nix
|
||||
# It's passed to this module and propagated to all imports automatically
|
||||
|
||||
/var/src/config-nginx
|
||||
{ _module.args = { inherit domain; }; } # passes <mydomain.com> for nginx virtualHosts
|
||||
/var/src/config-pict-rs
|
||||
/var/src/config-lnbits
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue