first attempt at ship

This commit is contained in:
Alisceon 2025-07-20 19:24:36 +02:00
parent 333ecafb68
commit 76ac9b9ee3
3 changed files with 87 additions and 16 deletions

View file

@ -5,12 +5,23 @@
[ ./hardware-configuration.nix ];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-partlabel/luks";
boot.resumeDevice = "/dev/vg0/swap";
time.timeZone = "Europe/Stockholm";
i18n.defaultLocale = "sv_SE.UTF-8";
services.openssh.enable = true;
fileSystems."/".options = [ "compress=zstd" ];
networking.hostName = "electra";
networking.networkmanager.enable = true;
time.timeZone = "UTC";
i18n.defaultLocale = "en_US.UTF-8";
services.xserver = {
enable = true;

52
hosts/electra/disko.nix Normal file
View file

@ -0,0 +1,52 @@
{
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
boot = {
size = "512M";
type = "EF00"; # EFI system partition
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "cryptroot";
settings.allowDiscards = true;
content = {
type = "lvm_pv";
vg = "vg0";
};
};
};
};
};
swap = {
size = "32G"; # Adjust to your RAM size
content = {
type = "swap";
resumeDevice = true;
};
};
lvm_vgs.vg0 = {
lvs = {
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "btrfs";
mountpoint = "/";
};
};
};
};
}