diff --git a/flake.nix b/flake.nix index 13b9cee..c148b0e 100644 --- a/flake.nix +++ b/flake.nix @@ -71,7 +71,7 @@ nixosConfigurations = (create-host [ "desktop@default" "desktop@work" - "homex" + "homelab" ]); }; } diff --git a/hosts/homex/configuration.nix b/hosts/homelab/configuration.nix similarity index 94% rename from hosts/homex/configuration.nix rename to hosts/homelab/configuration.nix index f123c80..cd70979 100755 --- a/hosts/homex/configuration.nix +++ b/hosts/homelab/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: +{ config, ... }: { imports = [ @@ -16,10 +16,9 @@ server = { enable = true; - flakeDir = "/home/guz/.nix#homex"; - name = "homex"; - - domain = "guz.local"; + flakeDir = "/home/guz/.nix#homelab"; + name = "homelab"; + domain = "homelab.local"; ip = "100.66.139.89"; localIp = "192.168.1.10"; diff --git a/hosts/homex/hardware-configuration.nix b/hosts/homelab/hardware-configuration.nix similarity index 100% rename from hosts/homex/hardware-configuration.nix rename to hosts/homelab/hardware-configuration.nix diff --git a/hosts/homex/secrets.nix b/hosts/homelab/secrets.nix similarity index 100% rename from hosts/homex/secrets.nix rename to hosts/homelab/secrets.nix diff --git a/hosts/homex/users/default.nix b/hosts/homelab/users/default.nix similarity index 100% rename from hosts/homex/users/default.nix rename to hosts/homelab/users/default.nix diff --git a/hosts/homex/users/guz.nix b/hosts/homelab/users/guz.nix similarity index 100% rename from hosts/homex/users/guz.nix rename to hosts/homelab/users/guz.nix diff --git a/modules/server/default.nix b/modules/server/default.nix index 86cd311..f53fb75 100644 --- a/modules/server/default.nix +++ b/modules/server/default.nix @@ -2,7 +2,7 @@ let cfg = config.server; - homelab = pkgs.writeShellScriptBin "homelab" '' + server = pkgs.writeShellScriptBin "server" '' gum="${pkgs.gum}/bin/gum"; flakeDir="${toString cfg.flakeDir}"; @@ -37,14 +37,14 @@ in enable = mkEnableOption ""; name = mkOption { type = str; - default = "homelab"; + default = "server"; }; flakeDir = mkOption { type = str; }; storage = mkOption { type = path; - default = /data/homelab; + default = /data + "/${cfg.name}"; description = "The Homelab central storage path"; }; domain = mkOption { @@ -65,7 +65,7 @@ in }; config = lib.mkIf cfg.enable { environment.systemPackages = [ - homelab + server ]; networking.firewall.allowedTCPPorts = lib.mkIf cfg.handleDomains [ 80 433 ];