Set up deployment config for nodes

main
kalle 2025-02-04 05:26:51 +01:00
parent 5ebaff36c4
commit 8a234dc1ed
2 changed files with 12 additions and 4 deletions

View File

@ -14,7 +14,7 @@
{ self, nixpkgs, ... }@inputs:
let
outputs = self.outputs;
utils = import ./utils.nix;
utils = import ./utils.nix { inherit inputs; };
homelabConfig = import ./config.nix;
roles = import ./roles { inherit utils; };

View File

@ -1,8 +1,16 @@
{
inputs,
...
}:
{
mkSystem =
{ hostConfig }:
{ inputs, ... }:
{
deployment = {
targetHost = hostConfig.ip;
targetUser = "maintenance";
};
imports = [
inputs.impermanence.nixosModules.impermanence
inputs.sops-nix.nixosModules.sops
@ -18,7 +26,7 @@
networking = {
hostName = hostConfig.hostname;
interfaces.ens18.ipv4.addresses = [
interfaces.eth0.ipv4.addresses = [
{
address = hostConfig.ip;
prefixLength = 24;
@ -27,7 +35,7 @@
nameservers = [ "192.168.10.1" ];
defaultGateway = {
address = "192.168.10.1";
interface = "ens18";
interface = "eth0";
};
};
system.stateVersion = hostConfig.stateVersion;