Skip to content

Commit

Permalink
refactor: cleanup disk config for skull and scrubber
Browse files Browse the repository at this point in the history
  • Loading branch information
flexiondotorg committed Mar 5, 2024
1 parent 69274e2 commit ec60fc5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
12 changes: 4 additions & 8 deletions nixos/scrubber/disks.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
{ disks ? [ "/dev/vda" ], ... }:
let
defaultBcachefsOpts = [ "defaults" "relatime" "nodiratime" ];
in
{
_: {
disko.devices = {
disk = {
vda = {
type = "disk";
device = builtins.elemAt disks 0;
device = "/dev/vda";
content = {
type = "gpt";
partitions = {
ESP = {
size = "1024M";
size = "512M";
type = "EF00";
content = {
format = "vfat";
Expand All @@ -26,7 +22,7 @@ in
content = {
extraArgs = [ "-f" ];
format = "bcachefs";
mountOptions = defaultBcachefsOpts;
mountOptions = [ "defaults" "relatime" "nodiratime" ];
mountpoint = "/";
type = "filesystem";
};
Expand Down
12 changes: 4 additions & 8 deletions nixos/skull/disks.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{ disks ? [ "/dev/nvme0n1" "/dev/nvme1n1" ], ... }:
let
defaultXfsOpts = [ "defaults" "relatime" "nodiratime" ];
in
{
_: {
disko.devices = {
disk = {
nvme0 = {
type = "disk";
device = builtins.elemAt disks 0;
device = "/dev/nvme0n1";
content = {
type = "table";
format = "gpt";
Expand All @@ -34,14 +30,14 @@ in
extraArgs = [ "-f" ];
format = "xfs";
mountpoint = "/";
mountOptions = defaultXfsOpts;
mountOptions = [ "defaults" "relatime" "nodiratime" ];
};
}];
};
};
nvme1 = {
type = "disk";
device = builtins.elemAt disks 1;
device = "/dev/nvme1n1";
content = {
type = "table";
format = "gpt";
Expand Down

0 comments on commit ec60fc5

Please sign in to comment.