Refactor shared Nix configuration to improve hostname handling and module imports

Updated the shared Nix configuration to extract the hostname from the domain, enhancing clarity in the setup. Reordered module imports to ensure proper dependency management, including the addition of module arguments for better customization. This change improves the overall organization and maintainability of the NixOS configuration.
This commit is contained in:
padreug 2025-10-08 18:02:36 +02:00
parent bab3e13111
commit c858eebb93

View file

@ -3,13 +3,14 @@
{
imports = [
./nginx.nix
./pict-rs.nix
./modules/lnbits-service.nix
{ _module.args = { inherit domain; }; }
./pict-rs.nix
./lnbits.nix
];
# Set hostname (passed as parameter)
networking.hostName = domain;
# Set hostname (extract from domain, e.g., "4lpaca" from "4lpaca.io")
networking.hostName = builtins.head (pkgs.lib.splitString "." domain);
# System packages
environment.systemPackages = with pkgs; [