From 2af0a820eeebb1228d1e612609ded72e238fc3a9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 19 Nov 2024 22:09:04 +0000 Subject: [PATCH] add disk --- systems/omoikane/default.nix | 1 + systems/omoikane/disk.nix | 42 +++++++++++++++++++++++++++++++++++ systems/omoikane/hardware.nix | 26 +++++----------------- 3 files changed, 48 insertions(+), 21 deletions(-) create mode 100644 systems/omoikane/disk.nix diff --git a/systems/omoikane/default.nix b/systems/omoikane/default.nix index f40df13..fa3722e 100644 --- a/systems/omoikane/default.nix +++ b/systems/omoikane/default.nix @@ -10,6 +10,7 @@ { imports = [ ./hardware.nix + ./disk.nix nixos-hardware.nixosModules.framework-16-7040-amd self.inputs.srvos.nixosModules.desktop ]; diff --git a/systems/omoikane/disk.nix b/systems/omoikane/disk.nix new file mode 100644 index 0000000..55c0b6d --- /dev/null +++ b/systems/omoikane/disk.nix @@ -0,0 +1,42 @@ +{...}: +{ + disko.devices = { + disk = { + main = { + device = "/dev/nvme0n1"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + end = "500M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + name = "root"; + end = "-0"; + content = { + type = "luks"; + name = "crypto"; + settings = { + allowDiscards = true; + }; + content = { + type = "filesystem"; + format = "bcachefs"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/systems/omoikane/hardware.nix b/systems/omoikane/hardware.nix index ca76a1a..e132ce1 100644 --- a/systems/omoikane/hardware.nix +++ b/systems/omoikane/hardware.nix @@ -9,27 +9,11 @@ }: { - fileSystems."/" = { - device = "/dev/disk/by-uuid/6842a9de-c5fd-4648-b3b8-f76e56633825"; - fsType = "ext4"; - }; - - boot.initrd.luks.devices."luks-eaed8652-a306-4434-a187-71e6fcb13e71".device = "/dev/disk/by-uuid/eaed8652-a306-4434-a187-71e6fcb13e71"; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/7C5A-EE45"; - fsType = "vfat"; - options = [ - "fmask=0022" - "dmask=0022" - ]; - }; - - fileSystems."/home/jopejoe1/Public/games" = { - device = "/dev/sda"; - fsType = "bcachefs"; - options = [ "compression=zstd" ]; - }; + # fileSystems."/home/jopejoe1/Public/games" = { + # device = "/dev/sda"; + # fsType = "bcachefs"; + # options = [ "compression=zstd" ]; + # }; powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; }