mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
feat(mugetsu): nf-generate
This commit is contained in:
parent
ff0c00384d
commit
de12febf68
12 changed files with 229 additions and 1 deletions
22
systems/idrac-mugetsu/default.nix
Normal file
22
systems/idrac-mugetsu/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
_: {
|
||||
type = "Linux";
|
||||
access = {
|
||||
online.available = true;
|
||||
};
|
||||
network.networks = {
|
||||
local = {
|
||||
slaac.enable = false;
|
||||
address4 = "10.1.1.13";
|
||||
address6 = null;
|
||||
};
|
||||
};
|
||||
exports = {
|
||||
status.displayName = "mugetsu/IDRAC";
|
||||
services = {
|
||||
sshd = {
|
||||
enable = true;
|
||||
ports.public.enable = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
13
systems/mugetsu/default.nix
Normal file
13
systems/mugetsu/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
_: {
|
||||
arch = "x86_64";
|
||||
type = "NixOS";
|
||||
modules = [
|
||||
./nixos.nix
|
||||
];
|
||||
network.networks = {
|
||||
local = {
|
||||
macAddress = "64:00:6a:c0:a1:4c";
|
||||
address4 = "10.1.1.60";
|
||||
};
|
||||
};
|
||||
}
|
||||
52
systems/mugetsu/hardware-configuration.nix
Normal file
52
systems/mugetsu/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = [
|
||||
pkgs.ipmitool
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = ["ahci" "xhci_pci" "ehci_pci" "usbhid" "usb_storage" "sd_mod" "sr_mod"];
|
||||
kernelModules = [];
|
||||
};
|
||||
kernelModules = [];
|
||||
extraModulePackages = [];
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
# TODO
|
||||
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
||||
fsType = "xfs";
|
||||
};
|
||||
};
|
||||
|
||||
networking.useNetworkd = true;
|
||||
systemd.network = {
|
||||
networks."40-eno1" = {
|
||||
inherit (config.systemd.network.links.eno1) matchConfig;
|
||||
address = ["10.1.1.60/24"];
|
||||
gateway = ["10.1.1.1"];
|
||||
DHCP = "no";
|
||||
networkConfig = {
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
linkConfig = {
|
||||
Multicast = true;
|
||||
};
|
||||
};
|
||||
links.eno1 = {
|
||||
matchConfig = {
|
||||
Type = "ether";
|
||||
MACAddress = "64:00:6a:c0:a1:4c";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
systems/mugetsu/nixos.nix
Normal file
14
systems/mugetsu/nixos.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
meta,
|
||||
...
|
||||
}: {
|
||||
imports = let
|
||||
inherit (meta) nixos;
|
||||
in [
|
||||
./hardware-configuration.nix
|
||||
#nixos.sops
|
||||
nixos.base
|
||||
];
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
|
|
@ -5,6 +5,8 @@
|
|||
"/mnt/kyuuto-data/minecraft mnt/kyuuto-data/minecraft none bind,optional,create=dir",
|
||||
"/mnt/kyuuto-data/systems/gengetsu/fs/root mnt/kyuuto-data/systems/gengetsu/fs/root none bind,optional,create=dir",
|
||||
"/mnt/kyuuto-data/systems/gengetsu/fs/boot mnt/kyuuto-data/systems/gengetsu/fs/boot none bind,optional,create=dir",
|
||||
"/mnt/kyuuto-data/systems/mugetsu/fs/root mnt/kyuuto-data/systems/mugetsu/fs/root none bind,optional,create=dir",
|
||||
"/mnt/kyuuto-data/systems/mugetsu/fs/boot mnt/kyuuto-data/systems/mugetsu/fs/boot none bind,optional,create=dir",
|
||||
"/dev/net/tun dev/net/tun none bind,optional,create=file"
|
||||
],
|
||||
"lxc.cgroup2.devices.allow": [
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ chmod 0775 /mnt/kyuuto-data/minecraft/simplebackups
|
|||
|
||||
mkkyuuto data/systems 0 0 0775
|
||||
nfsystemroot=/mnt/kyuuto-data/systems
|
||||
for nfsystem in gengetsu; do
|
||||
for nfsystem in gengetsu mugetsu; do
|
||||
mkkyuuto data/systems/$nfsystem 0 0 0750
|
||||
|
||||
if [[ ! -d $nfsystemroot/$nfsystem/fs ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue