Compare commits

..

No commits in common. "a784b129627283c6bb313c480c14360da473af8a" and "7b7bcac73aa3c176605781ac912e85effaeb086b" have entirely different histories.

7 changed files with 9 additions and 71 deletions

View file

@ -1,44 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
# Check for hostname argument
if [[ $# -ne 1 ]]; then
echo "Usage: $0 <nixos-hostname>"
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

View file

@ -18,6 +18,9 @@ in
deploy = {
enable = false;
};
services = {
tty-ips.enable = true;
};
networking = {
hostName = "base";
};

View file

@ -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";
}

View file

@ -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";

View file

@ -19,6 +19,7 @@ in
address = "200:b938:d405:92df:a6e:1ffd:5213:26b";
};
services = {
tty-ips.enable = true;
uptime-kuma = {
enable = true;
settings = {

View file

@ -26,6 +26,7 @@ in
};
services = {
tty-ips.enable = true;
otf = {
enable = true;
environment = {

View file

@ -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.";
};
};