From 180e5743cc2308ae3182b07bfa9361f939fe03a6 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Thu, 10 Oct 2024 17:05:46 +0200 Subject: [PATCH] Use new hard disk on `sisko` --- hosts/sisko/default.nix | 8 ++---- hosts/sisko/disko.nix | 61 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 60 insertions(+), 9 deletions(-) diff --git a/hosts/sisko/default.nix b/hosts/sisko/default.nix index e1e89e5..8a386be 100644 --- a/hosts/sisko/default.nix +++ b/hosts/sisko/default.nix @@ -28,6 +28,8 @@ "garmin-collector" "restic" "atuin" + "rock5b-fan-control" + "immich" ] ++ [ ./disko.nix @@ -94,12 +96,6 @@ fileSystems."/persist".neededForBoot = true; boot.tmp.cleanOnBoot = true; - fileSystems."/mnt/hd" = { - device = "/dev/disk/by-id/ata-WDC_WD5000AAKX-08U6AA0_WD-WCC2E5TR40FU-part1"; - fsType = "ext4"; - options = [ "nofail" ]; - }; - environment.systemPackages = with pkgs; [ cifs-utils ]; diff --git a/hosts/sisko/disko.nix b/hosts/sisko/disko.nix index 909a33b..ba5c708 100644 --- a/hosts/sisko/disko.nix +++ b/hosts/sisko/disko.nix @@ -1,9 +1,7 @@ let ssd = "/dev/disk/by-id/ata-CT240BX300SSD1_1739E1042F3C"; + hd = "/dev/disk/by-id/ata-ST12000NM0558_ZHZ6006Q"; in -# hd1 = "/dev/disk/by-id/ata-WDC_WD10EADS-22M2B0_WD-WCAV52709550"; -# hd2 = "/dev/disk/by-id/ata-WDC_WD10EADX-22TDHB0_WD-WCAV5V359530"; -# old_hd = "/dev/disk/by-id/ata-WDC_WD5000AAKX-08U6AA0_WD-WCC2E5TR40FU"; { disko.devices = { nodev."/" = { @@ -58,6 +56,63 @@ in }; }; }; + hd = { + device = hd; + type = "disk"; + content = { + type = "gpt"; + partitions = { + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "bcachefs"; + mountpoint = "/mnt/hd"; + }; + }; + }; + }; + }; + # hd = { + # type = "disk"; + # device = hd; + # content = { + # type = "gpt"; + # partitions = { + # zfs = { + # size = "100%"; + # content = { + # type = "zfs"; + # pool = "zroot"; + # }; + # }; + # }; + # }; + # }; + # }; + # zpool = { + # zroot = { + # type = "zpool"; + # rootFsOptions = { + # compression = "lz4"; + # acltype = "posixacl"; + # xattr = "sa"; + # "com.sun:auto-snapshot" = "true"; + # mountpoint = "none"; + # }; + # datasets = { + # "root" = { + # type = "zfs_fs"; + # options.mountpoint = "/mnt/hd"; + # mountpoint = "/mnt/hd"; + # }; + # "root/torrent" = { + # type = "zfs_fs"; + # options.mountpoint = "/mnt/hd/torrent"; + # mountpoint = "/mnt/hd/torrent"; + # }; + # }; + # }; }; }; }