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:
parent
bab3e13111
commit
c858eebb93
1 changed files with 4 additions and 3 deletions
|
|
@ -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; [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue