diskoConfigs/laptop-ssd: init

This commit is contained in:
Gabriel Arazas 2024-11-21 11:51:25 +08:00
parent ae551d64c7
commit 2cef0d1dba
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
4 changed files with 91 additions and 57 deletions

View File

@ -0,0 +1,30 @@
{ disk ? "/dev/nvme1n1", prefix ? "ni", ... }:
{
disko.devices = {
disk."${prefix}-secondary" = {
device = disk;
type = "disk";
content = {
type = "gpt";
partitions = {
data = {
size = "100%";
type = "8300";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/root" = {
mountOptions = [ "compress=zstd:10" ];
mountpoint = "/";
};
};
};
};
};
};
};
};
}

View File

@ -4,5 +4,6 @@
setups.disko.configs = {
archive = { };
external-hdd = { };
laptop-ssd = { };
};
}

View File

@ -57,6 +57,7 @@ in
};
};
};
diskoConfigs = [ "laptop-ssd" ];
};
# A remote server.

View File

@ -1,9 +1,10 @@
{ disk ? "/dev/nvme0n1", config, lib, ... }:
{ primaryDisk ? "/dev/nvme0n1", secondaryDisk ? null, config, lib, ... }:
{
disko.devices = {
disk."${config.hostname}-primary" = {
device = disk;
disko.devices = lib.mkMerge [
{
disk."${config.networking.hostName}-primary" = {
device = primaryDisk;
type = "disk";
content = {
type = "gpt";
@ -66,5 +67,6 @@
};
};
};
};
}
];
}