diff --git a/.forgejo/workflows/needs-deploy.sh b/.forgejo/workflows/needs-deploy.sh deleted file mode 100755 index e61eed5..0000000 --- a/.forgejo/workflows/needs-deploy.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Check for hostname argument -if [[ $# -ne 1 ]]; then - echo "Usage: $0 " - exit 1 -fi - -HOST="$1" -REPO_PATH="git+file://$PWD" - -CURRENT_COMMIT=$(git rev-parse HEAD) -PREV_COMMIT=$(git rev-parse HEAD^) - -# Check if the host exists at the current commit -if ! nix eval --quiet --expr " - let - flake = builtins.getFlake \"${REPO_PATH}?rev=${CURRENT_COMMIT}\"; - in - builtins.hasAttr \"${HOST}\" flake.nixosConfigurations -"; then - echo "Error: Host '${HOST}' not found in nixosConfigurations at HEAD." - exit 1 -fi - -# Now check for derivation change -RESULT=$(nix eval --raw --expr " - let - flake = builtins.getFlake; - prev = flake \"${REPO_PATH}?rev=${PREV_COMMIT}\"; - curr = flake \"${REPO_PATH}?rev=${CURRENT_COMMIT}\"; - in - if prev.nixosConfigurations.\"${HOST}\".config.system.build.toplevel != - curr.nixosConfigurations.\"${HOST}\".config.system.build.toplevel - then \"changed\" else \"unchanged\" -") - -# Output result -if [[ $RESULT == "changed" ]]; then - echo "System derivation changed for host '${HOST}' — deploy!" -else - echo "No change for host '${HOST}' — skip deployment." -fi diff --git a/configurations/nixos/base/default.nix b/configurations/nixos/base/default.nix index 26a9b5f..6333d7d 100644 --- a/configurations/nixos/base/default.nix +++ b/configurations/nixos/base/default.nix @@ -18,6 +18,9 @@ in deploy = { enable = false; }; + services = { + tty-ips.enable = true; + }; networking = { hostName = "base"; }; diff --git a/configurations/nixos/caddy/default.nix b/configurations/nixos/caddy/default.nix deleted file mode 100644 index f513c30..0000000 --- a/configurations/nixos/caddy/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - flake, - modulesPath, - config, - ... -}: - -let - inherit (flake) inputs; - inherit (inputs) self; -in -{ - imports = [ - self.nixosModules.default - "${modulesPath}/virtualisation/lxc-container.nix" - ]; - deploy = { - address = "unknown.local"; - }; - networking = { - hostName = "caddy"; - }; - environment.systemPackages = [ - ]; - system.stateVersion = "25.05"; -} diff --git a/configurations/nixos/forgejo-runner-tofu/default.nix b/configurations/nixos/forgejo-runner-tofu/default.nix index 724ab9a..886b1c4 100644 --- a/configurations/nixos/forgejo-runner-tofu/default.nix +++ b/configurations/nixos/forgejo-runner-tofu/default.nix @@ -61,6 +61,9 @@ in deploy = { address = "201:ea26:66c7:657b:3599:63a6:c66c:d388"; }; + services = { + tty-ips.enable = true; + }; networking = { firewall.enable = lib.mkForce false; hostName = "forgejo-runner-tofu"; diff --git a/configurations/nixos/observer-tofu/default.nix b/configurations/nixos/observer-tofu/default.nix index b1d30b8..02401c2 100644 --- a/configurations/nixos/observer-tofu/default.nix +++ b/configurations/nixos/observer-tofu/default.nix @@ -19,6 +19,7 @@ in address = "200:b938:d405:92df:a6e:1ffd:5213:26b"; }; services = { + tty-ips.enable = true; uptime-kuma = { enable = true; settings = { diff --git a/configurations/nixos/tofu/default.nix b/configurations/nixos/tofu/default.nix index 74e1a5e..b8acf85 100644 --- a/configurations/nixos/tofu/default.nix +++ b/configurations/nixos/tofu/default.nix @@ -26,6 +26,7 @@ in }; services = { + tty-ips.enable = true; otf = { enable = true; environment = { diff --git a/modules/nixos/common/discovery.nix b/modules/nixos/common/discovery.nix index b212a49..dbc65a3 100644 --- a/modules/nixos/common/discovery.nix +++ b/modules/nixos/common/discovery.nix @@ -12,7 +12,7 @@ in options.services.tty-ips = { enable = mkOption { type = types.bool; - default = true; + default = false; description = "Show interface IPs in TTY login using a dynamic issue file."; }; };