Merge in working separate nocix config to main nixos-anywhere config

This involves renaming the disks because when I rebooted the VM the disk
names changed. I also made the root disk just 50G and put the rest in
/var, as well as formatting and mounting the big rust disk.
This commit is contained in:
Eli Ribble 2025-09-08 19:44:59 +00:00
parent b6f43b8795
commit 803e1d4b4f
2 changed files with 77 additions and 26 deletions

View file

@ -17,20 +17,38 @@
efiInstallAsRemovable = true;
};
environment.systemPackages = map lib.lowPrio [
pkgs.curl
pkgs.dig
pkgs.gitMinimal
];
networking = {
defaultGateway = {
address = "107.150.59.201";
interface = "enp2s0";
};
defaultGateway6 = {
address = "2604:4300:a:27e::1";
interface = "enp2s0";
};
interfaces.enp2s0 = {
ipv4.addresses = [{
address = "107.150.59.202";
prefixLength = 29;
}];
ipv6.addresses = [{
address = "2604:4300:a:27e::2";
prefixLength = 64;
}];
};
nameservers = ["192.187.107.16"];
search = ["nocix.net"];
};
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys =
[
# change this to your ssh key
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBvhtF6nRWlA6PVs71Eek7p0p2PxTd3P6ZEGFV2t75MB eliribble@nixos"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHL1SpT3KR8XeXtH19muncYVrKxWzWdWtJYNTwoJGTm3 eliribble@Elis-Mac-mini.local"
] ++ (args.extraPublicKeys or []); # this is used for unit-testing this module and can be removed if not needed
system.stateVersion = "25.05";
}

View file

@ -2,33 +2,55 @@
{ lib, ... }:
{
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/sda";
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";
disk = {
sda = {
device = "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
MBR = {
size = "1M";
type = "EF02"; # for grub MBR
};
boot = {
size = "500M";
type = "EF00"; # for grub MBR
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
root = {
size = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
};
sdb = {
device = "/dev/sdb";
type = "disk";
content = {
type = "gpt";
partitions = {
bigdisk = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/mnt/bigdisk";
mountOptions = [
"defaults"
];
};
};
};
};
@ -39,7 +61,7 @@
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
size = "50G";
content = {
type = "filesystem";
format = "ext4";
@ -49,6 +71,17 @@
];
};
};
var = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/var";
mountOptions = [
"defaults"
];
};
};
};
};
};