Compare commits

...

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 168 additions and 163 deletions

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; };

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";
type = "partition"; partitions = [
name = "ESP"; {
start = "0"; type = "partition";
end = "512MiB"; name = "ESP";
fs-type = "fat32"; start = "0";
bootable = true; end = "512MiB";
content = { fs-type = "fat32";
type = "filesystem"; bootable = true;
format = "vfat"; content = {
mountpoint = "/boot"; type = "filesystem";
}; format = "vfat";
} mountpoint = "/boot";
{ extraArgs = [ "-n boot" ];
type = "partition"; };
name = "root"; }
start = "512MiB"; {
end = "100%"; type = "partition";
part-type = "primary"; name = "root";
bootable = true; start = "512MiB";
content = { end = "100%";
type = "filesystem"; part-type = "primary";
format = "ext4"; bootable = true;
mountpoint = "/"; content = {
}; type = "filesystem";
} format = "ext4";
]; mountpoint = "/";
}; extraArgs = [ "-L nixos" ];
}; };
sda = { }
type = "disk"; ];
device = "/dev/sda"; };
content = { };
type = "table"; sda = {
format = "gpt"; type = "disk";
partitions = [{ device = "/dev/sda";
type = "partition"; content = {
name = "zfs"; type = "table";
start = "128MiB"; format = "gpt";
end = "100%"; partitions = [{
content = { type = "partition";
type = "zfs"; name = "zfs";
pool = "tank"; start = "128MiB";
}; end = "100%";
}]; content = {
}; type = "zfs";
}; pool = "tank";
sdb = { };
type = "disk"; }];
device = "/dev/sdb"; };
content = { };
type = "table"; sdb = {
format = "gpt"; type = "disk";
partitions = [{ device = "/dev/sdb";
type = "partition"; content = {
name = "zfs"; type = "table";
start = "128MiB"; format = "gpt";
end = "100%"; partitions = [{
content = { type = "partition";
type = "zfs"; name = "zfs";
pool = "tank"; start = "128MiB";
}; end = "100%";
}]; content = {
}; type = "zfs";
}; pool = "tank";
sdc = { };
type = "disk"; }];
device = "/dev/sdc"; };
content = { };
type = "table"; sdc = {
format = "gpt"; type = "disk";
partitions = [{ device = "/dev/sdc";
type = "partition"; content = {
name = "zfs"; type = "table";
start = "128MiB"; format = "gpt";
end = "100%"; partitions = [{
content = { type = "partition";
type = "zfs"; name = "zfs";
pool = "tank"; start = "128MiB";
}; end = "100%";
}]; content = {
}; type = "zfs";
}; pool = "tank";
}; };
zpool = { }];
tank = { };
type = "zpool"; };
mode = "raidz1"; };
rootFsOptions = { zpool = {
compression = "on"; # lz4 by default tank = {
"com.sun:auto-snapshot" = "false"; type = "zpool";
ashift = 12; mode = "raidz1";
}; rootFsOptions = {
# mountpoint = "/"; compression = "on"; # lz4 by default
"com.sun:auto-snapshot" = "false";
datasets = { ashift = "12";
media = { };
zfs_type = "filesystem"; # mountpoint = "/";
mountpoint = "none";
options."com.sun:auto-snapshot" = "false"; datasets = {
media = {
zfs_type = "filesystem";
mountpoint = "/media";
options."com.sun:auto-snapshot" = "false";
};
# "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";
# };
}; };
# "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";
# };
}; };
}; };
}; };