dot

vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks

58 lines1562 bytesNix
1# The NVMe drive, as disko partitions and formats it at install time (see
2# MIGRATION.md). Running disko on it erases everything on the drive. The two
3# SATA drives (sda, sdb) aren't listed, so disko never touches them.
4#
5# Same shape as CachyOS had it: an EFI partition for systemd-boot and one btrfs
6# partition with subvolumes, compressed with zstd. Swap is zram (base.nix).
7let
8 mountOptions = [
9 "noatime"
10 "compress=zstd"
11 ];
12in
13{
14 disko.devices.disk.main = {
15 type = "disk";
16 device = "/dev/disk/by-id/nvme-Samsung_SSD_980_PRO_1TB_S5GXNF1R877751D";
17 content = {
18 type = "gpt";
19 partitions = {
20 ESP = {
21 size = "2G";
22 type = "EF00";
23 content = {
24 type = "filesystem";
25 format = "vfat";
26 mountpoint = "/boot";
27 mountOptions = [ "umask=0077" ];
28 };
29 };
30 root = {
31 size = "100%";
32 content = {
33 type = "btrfs";
34 extraArgs = [ "-f" ];
35 subvolumes = {
36 "@" = {
37 mountpoint = "/";
38 inherit mountOptions;
39 };
40 "@home" = {
41 mountpoint = "/home";
42 inherit mountOptions;
43 };
44 "@nix" = {
45 mountpoint = "/nix";
46 inherit mountOptions;
47 };
48 "@log" = {
49 mountpoint = "/var/log";
50 inherit mountOptions;
51 };
52 };
53 };
54 };
55 };
56 };
57 };
58}