dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
modules/hosts/valkyrie/_disk/dualboot.nix (1429B)
1## Dual Boot Layout
2{config, ...}: {
3 nixos = {lib, ...}: let
4 inherit (config.flake) files;
5 inherit (lib) mkForce;
6 in {
7 # Filesystem
8 system.fs = {
9 scheme = "advanced";
10 disk = "/dev/disk/by-id/nvme-eui.00000000000000000026b7686ab56005";
11 };
12
13 # Bypass Disko
14 disko.devices.disk.main = mkForce {};
15
16 # Boot Loader
17 boot = {
18 loader.timeout = mkForce 5;
19 lanzaboote.settings.default = mkForce "auto-windows";
20 zfs.devNodes = mkForce "/dev/disk/by-partlabel/NixOS";
21 };
22
23 # Zram SWAP
24 zramSwap = {
25 enable = true;
26 algorithm = "zstd";
27 memoryPercent = 17;
28 };
29
30 # Shared ESP
31 fileSystems."/boot" = {
32 device = "/dev/disk/by-partuuid/4fdd8116-b999-4dab-97a6-bb56e99e0635";
33 fsType = "vfat";
34 options = ["umask=0077"];
35 };
36
37 # Windows Partition
38 fileSystems."${files.path.data}/windows" = {
39 device = "/dev/disk/by-label/System";
40 fsType = "ntfs3";
41 options = ["rw" "nofail" "uid=1000" "gid=100" "dmask=022" "fmask=133"];
42 };
43
44 fileSystems."${files.path.files}" = {
45 device = "${files.path.data}/windows/Files";
46 fsType = "none";
47 options = ["bind"];
48 };
49
50 fileSystems."${files.path.sync}" = {
51 device = "${files.path.data}/windows/Files/Sync";
52 fsType = "none";
53 options = ["bind"];
54 };
55
56 # System Clock
57 time.hardwareClockInLocalTime = true;
58 };
59}