devices.srv2: separate swap config

This commit is contained in:
2025-07-09 10:02:28 +08:00
parent 1dd86833b9
commit ae705f203b
3 changed files with 8 additions and 10 deletions

View File

@@ -7,17 +7,13 @@ inputs:
model.type = "server";
system =
{
fileSystems =
fileSystems.mount = let inherit (inputs.config.nixos.model.cluster) clusterName nodeName; in
{
mount = let inherit (inputs.config.nixos.model.cluster) clusterName nodeName; in
{
vfat."/dev/disk/by-partlabel/${clusterName}-${nodeName}-boot" = "/boot";
btrfs."/dev/disk/by-partlabel/${clusterName}-${nodeName}-root1" =
{ "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
nfs."${inputs.topInputs.self.config.dns."chn.moe".getAddress "wg1.pc"}:/" =
{ mountPoint = "/nix/remote/pc"; hard = false; };
};
swap = [ "/nix/swap/swap" ];
vfat."/dev/disk/by-partlabel/${clusterName}-${nodeName}-boot" = "/boot";
btrfs."/dev/disk/by-partlabel/${clusterName}-${nodeName}-root1" =
{ "/nix" = "/nix"; "/nix/rootfs/current" = "/"; };
nfs."${inputs.topInputs.self.config.dns."chn.moe".getAddress "wg1.pc"}:/" =
{ mountPoint = "/nix/remote/pc"; hard = false; };
};
nixpkgs.cuda.capabilities =
[

View File

@@ -16,6 +16,7 @@ inputs:
trust = [ "eno2" ];
};
nix.remote.slave = {};
fileSystems.swap = [ "/dev/disk/by-partlabel/srv2-node0-swap" ];
};
services =
{

View File

@@ -13,6 +13,7 @@ inputs:
{ ip = "192.168.178.2"; mask = 24; gateway = "192.168.178.1"; dns = "192.168.178.1"; };
trust = [ "enp58s0" ];
};
fileSystems.swap = [ "/nix/swap/swap" ];
};
services.beesd."/".hashTableSizeMB = 64;
};