27 lines
686 B
Nix
27 lines
686 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
# Install Git, curl, and other required tools
|
|
environment.systemPackages = with pkgs; [ git curl ];
|
|
|
|
# Enable SSH for initial deployment
|
|
services.openssh = {
|
|
enable = true;
|
|
permitRootLogin = "yes";
|
|
passwordAuthentication = true;
|
|
};
|
|
|
|
# Clone the repository so deploy.sh can use it
|
|
system.activationScripts.setup-deploy = ''
|
|
#!${pkgs.bash}/bin/bash
|
|
set -euo pipefail
|
|
|
|
# Create the target directory
|
|
mkdir -p /etc/nixos-infra
|
|
|
|
# The deploy script has already been pushed to /usr/local/bin/deploy-nixos
|
|
# by create-lxc-nixos.sh; it will clone the repo and apply the config.
|
|
'';
|
|
|
|
system.stateVersion = "25.11";
|
|
} |