cloud init migration

This commit is contained in:
2025-04-08 19:21:03 -04:00
parent b5d767ccee
commit 96f2373b5c
4 changed files with 35 additions and 51 deletions

View File

@@ -1,4 +1,4 @@
{ pkgs, namespace, lib, modulesPath, ... }:
{ namespace, lib, modulesPath, ... }:
let
inherit (lib.${namespace}) enabled;
in
@@ -12,12 +12,6 @@ in
system.stateVersion = "24.11";
time.timeZone = "UTC";
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
autoResize = true;
};
reichard = {
nix = enabled;
@@ -54,46 +48,5 @@ in
};
};
};
systemd.services = {
# RKE2 - Wait Cloud Init
rke2-server = {
after = [ "cloud-final.service" ];
requires = [ "cloud-final.service" ];
};
# Runtime iSCSI Initiator Setup
iscsi-initiator-setup = {
description = "Setup iSCSI Initiator Name";
requires = [ "cloud-final.service" ];
before = [ "iscsid.service" ];
after = [ "cloud-final.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
path = [ pkgs.hostname pkgs.util-linux ];
script = ''
mkdir -p /run/iscsi
echo "InitiatorName=iqn.2025.org.nixos:$(hostname)" > /run/iscsi/initiatorname.iscsi
mount --bind /run/iscsi/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
'';
};
};
environment = {
systemPackages = with pkgs; [
htop
nfs-utils
tmux
vim
];
# Don't Manage - Runtime Generation
etc."iscsi/initiatorname.iscsi".enable = false;
};
};
}