move genepi disk to ext4 using clan
This commit is contained in:
@@ -37,6 +37,8 @@
|
|||||||
networking.hostName = "genepi";
|
networking.hostName = "genepi";
|
||||||
clan.core.networking.targetHost = "root@genepi.local";
|
clan.core.networking.targetHost = "root@genepi.local";
|
||||||
|
|
||||||
|
disko.devices.disk.main.device = "/dev/disk/by-id/ata-WD_Green_M.2_2280_480GB_2251E6411147";
|
||||||
|
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
dates = "weekly";
|
||||||
|
|||||||
@@ -1,66 +1,40 @@
|
|||||||
{
|
{
|
||||||
|
clan-core,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
suffix = config.clan.core.vars.generators.disk-id.files.diskId.value;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ clan-core.clanModules.disk-id ];
|
||||||
|
|
||||||
disko.devices.disk.main = {
|
disko.devices.disk.main = {
|
||||||
|
name = "main-" + suffix;
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = "/dev/disk/by-id/ata-WD_Green_M.2_2280_480GB_2251E6411147";
|
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
ESP = {
|
boot = {
|
||||||
|
type = "EF02";
|
||||||
|
size = "1M";
|
||||||
priority = 1;
|
priority = 1;
|
||||||
name = "ESP";
|
};
|
||||||
start = "1M";
|
ESP = {
|
||||||
end = "512M";
|
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
|
size = "512M";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
mountpoint = "/boot";
|
mountpoint = "/boot";
|
||||||
mountOptions = [ "umask=0077" ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
root = {
|
root = {
|
||||||
end = "-4G";
|
end = "-4G";
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "filesystem";
|
||||||
extraArgs = [
|
format = "ext4";
|
||||||
"-L"
|
mountpoint = "/";
|
||||||
"nixos"
|
|
||||||
"-f" # Override existing partition
|
|
||||||
];
|
|
||||||
subvolumes = {
|
|
||||||
"/root" = {
|
|
||||||
mountpoint = "/";
|
|
||||||
mountOptions = [
|
|
||||||
"subvol=root"
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"/home" = {
|
|
||||||
mountpoint = "/home";
|
|
||||||
mountOptions = [
|
|
||||||
"subvol=home"
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"/nix" = {
|
|
||||||
mountpoint = "/nix";
|
|
||||||
mountOptions = [
|
|
||||||
"subvol=nix"
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"/log" = {
|
|
||||||
mountpoint = "/var/log";
|
|
||||||
mountOptions = [
|
|
||||||
"subvol=log"
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
swap = {
|
swap = {
|
||||||
|
|||||||
Reference in New Issue
Block a user