5 Commits

Author SHA1 Message Date
Noah Masur 30fe7c2d18 disable disko enforcement 2023-02-25 10:53:45 -05:00
Noah Masur 08716d1c98 fix: label syntax 2023-02-25 10:37:28 -05:00
Noah Masur 60b68785a9 fix: types 2023-02-25 10:35:56 -05:00
Noah Masur c360460d80 add filesystem labels to disko config 2023-02-25 10:32:54 -05:00
Noah Masur b1b5e77f47 back to disko module once again 2023-02-25 10:22:24 -05:00
2 changed files with 157 additions and 152 deletions
+1 -1
View File
@@ -10,6 +10,7 @@ nixpkgs.lib.nixosSystem {
specialArgs = { }; specialArgs = { };
modules = [ modules = [
./hardware-configuration.nix ./hardware-configuration.nix
./disks.nix
../../modules/common ../../modules/common
../../modules/nixos ../../modules/nixos
(removeAttrs globals [ "mail.server" ]) (removeAttrs globals [ "mail.server" ])
@@ -17,7 +18,6 @@ nixpkgs.lib.nixosSystem {
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
disko.nixosModules.disko disko.nixosModules.disko
{ {
disko.devices = import ./disks.nix;
server = true; server = true;
gui.enable = false; gui.enable = false;
theme = { colors = (import ../../colorscheme/gruvbox).dark; }; theme = { colors = (import ../../colorscheme/gruvbox).dark; };
+156 -151
View File
@@ -1,166 +1,171 @@
{ { ... }: {
disk = { disko.enableConfig = false;
boot = { disko.devices = {
type = "disk"; disk = {
device = "/dev/nvme0n1"; boot = {
content = { type = "disk";
type = "table"; device = "/dev/nvme0n1";
format = "gpt"; content = {
partitions = [ type = "table";
{ format = "gpt";
partitions = [
{
type = "partition";
name = "ESP";
start = "0";
end = "512MiB";
fs-type = "fat32";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
extraArgs = [ "-n boot" ];
};
}
{
type = "partition";
name = "root";
start = "512MiB";
end = "100%";
part-type = "primary";
bootable = true;
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
extraArgs = [ "-L nixos" ];
};
}
];
};
};
sda = {
type = "disk";
device = "/dev/sda";
content = {
type = "table";
format = "gpt";
partitions = [{
type = "partition"; type = "partition";
name = "ESP"; name = "zfs";
start = "0"; start = "128MiB";
end = "512MiB"; end = "100%";
fs-type = "fat32";
bootable = true;
content = { content = {
type = "filesystem"; type = "zfs";
format = "vfat"; pool = "tank";
mountpoint = "/boot";
}; };
} }];
{ };
};
sdb = {
type = "disk";
device = "/dev/sdb";
content = {
type = "table";
format = "gpt";
partitions = [{
type = "partition"; type = "partition";
name = "root"; name = "zfs";
start = "512MiB"; start = "128MiB";
end = "100%"; end = "100%";
part-type = "primary";
bootable = true;
content = { content = {
type = "filesystem"; type = "zfs";
format = "ext4"; pool = "tank";
mountpoint = "/";
}; };
} }];
]; };
}; };
}; sdc = {
sda = { type = "disk";
type = "disk"; device = "/dev/sdc";
device = "/dev/sda"; content = {
content = { type = "table";
type = "table"; format = "gpt";
format = "gpt"; partitions = [{
partitions = [{ type = "partition";
type = "partition"; name = "zfs";
name = "zfs"; start = "128MiB";
start = "128MiB"; end = "100%";
end = "100%"; content = {
content = { type = "zfs";
type = "zfs"; pool = "tank";
pool = "tank"; };
}; }];
}]; };
}; };
}; };
sdb = { zpool = {
type = "disk"; tank = {
device = "/dev/sdb"; type = "zpool";
content = { mode = "raidz1";
type = "table"; rootFsOptions = {
format = "gpt"; compression = "on"; # lz4 by default
partitions = [{ "com.sun:auto-snapshot" = "false";
type = "partition"; ashift = "12";
name = "zfs"; };
start = "128MiB"; # mountpoint = "/";
end = "100%";
content = { datasets = {
type = "zfs"; media = {
pool = "tank"; zfs_type = "filesystem";
}; mountpoint = "/media";
}]; options."com.sun:auto-snapshot" = "false";
};
};
sdc = {
type = "disk";
device = "/dev/sdc";
content = {
type = "table";
format = "gpt";
partitions = [{
type = "partition";
name = "zfs";
start = "128MiB";
end = "100%";
content = {
type = "zfs";
pool = "tank";
}; };
}]; # "media/movies" = {
}; # zfs_type = "filesystem";
}; # mountpoint = "/media/movies";
}; # options.recordsize = "1M";
zpool = { # };
tank = { # "media/tv" = {
type = "zpool"; # zfs_type = "filesystem";
mode = "raidz1"; # mountpoint = "/media/tv";
rootFsOptions = { # options.recordsize = "1M";
compression = "on"; # lz4 by default # };
"com.sun:auto-snapshot" = "false"; # "media/books" = {
ashift = 12; # zfs_type = "filesystem";
}; # mountpoint = "/media/books";
# mountpoint = "/"; # };
# archive = {
datasets = { # zfs_type = "filesystem";
media = { # mountpoint = "/archive";
zfs_type = "filesystem"; # options.compression = "zstd";
mountpoint = "none"; # options."com.sun:auto-snapshot" = "true";
options."com.sun:auto-snapshot" = "false"; # };
# zfs_unmounted_fs = {
# zfs_type = "filesystem";
# options.mountpoint = "none";
# };
# zfs_legacy_fs = {
# zfs_type = "filesystem";
# options.mountpoint = "legacy";
# mountpoint = "/zfs_legacy_fs";
# };
# zfs_testvolume = {
# zfs_type = "volume";
# size = "10M";
# content = {
# type = "filesystem";
# format = "ext4";
# mountpoint = "/ext4onzfs";
# };
# };
# encrypted = {
# zfs_type = "filesystem";
# size = "20M";
# options = {
# mountpoint = "none";
# encryption = "aes-256-gcm";
# keyformat = "passphrase";
# keylocation = "file:///tmp/secret.key";
# };
# };
# "encrypted/test" = {
# zfs_type = "filesystem";
# size = "2M";
# mountpoint = "/zfs_crypted";
# };
}; };
# "media/movies" = {
# zfs_type = "filesystem";
# mountpoint = "/media/movies";
# options.recordsize = "1M";
# };
# "media/tv" = {
# zfs_type = "filesystem";
# mountpoint = "/media/tv";
# options.recordsize = "1M";
# };
# "media/books" = {
# zfs_type = "filesystem";
# mountpoint = "/media/books";
# };
# archive = {
# zfs_type = "filesystem";
# mountpoint = "/archive";
# options.compression = "zstd";
# options."com.sun:auto-snapshot" = "true";
# };
# zfs_unmounted_fs = {
# zfs_type = "filesystem";
# options.mountpoint = "none";
# };
# zfs_legacy_fs = {
# zfs_type = "filesystem";
# options.mountpoint = "legacy";
# mountpoint = "/zfs_legacy_fs";
# };
# zfs_testvolume = {
# zfs_type = "volume";
# size = "10M";
# content = {
# type = "filesystem";
# format = "ext4";
# mountpoint = "/ext4onzfs";
# };
# };
# encrypted = {
# zfs_type = "filesystem";
# size = "20M";
# options = {
# mountpoint = "none";
# encryption = "aes-256-gcm";
# keyformat = "passphrase";
# keylocation = "file:///tmp/secret.key";
# };
# };
# "encrypted/test" = {
# zfs_type = "filesystem";
# size = "2M";
# mountpoint = "/zfs_crypted";
# };
}; };
}; };
}; };