add rackserv vps configuration
This commit is contained in:
parent
9b237ce9b3
commit
a1dc18d3c8
6 changed files with 120 additions and 0 deletions
42
sys/machines/rackserv/default.nix
Normal file
42
sys/machines/rackserv/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
systemProfiles,
|
||||
specialArgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
"${inputs.nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
inputs.disko.nixosModules.disko
|
||||
./disk-config.nix
|
||||
]
|
||||
++ (map (x: systemProfiles + x) [
|
||||
/core/security.nix
|
||||
/core/tools.nix
|
||||
/core/ssh.nix
|
||||
/core/deploy.nix
|
||||
|
||||
/nix/default.nix
|
||||
|
||||
/network/tailscale.nix
|
||||
/network/networkd.nix
|
||||
]);
|
||||
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
};
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
environment.persistence."/persist".enable = false;
|
||||
|
||||
networking.hostName = "rackserv";
|
||||
|
||||
nixpkgs.hostPlatform.system = "x86_64-linux";
|
||||
system.stateVersion = "25.05";
|
||||
}
|
52
sys/machines/rackserv/disk-config.nix
Normal file
52
sys/machines/rackserv/disk-config.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{lib, ...}: {
|
||||
disko.devices = {
|
||||
disk.disk1 = {
|
||||
device = lib.mkDefault "/dev/vda";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
esp = {
|
||||
name = "ESP";
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
name = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
pool = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%FREE";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
mountOptions = ["defaults"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue