diff options
author | tzlil <tzlils@protonmail.com> | 2023-02-04 14:09:03 +0200 |
---|---|---|
committer | tzlil <tzlils@protonmail.com> | 2023-02-04 14:09:03 +0200 |
commit | 100d37bbf51545fd8c258059e3c947d9ce51fd60 (patch) | |
tree | d85ec25a71666002be1b02066efbc16c0c0e7177 /hosts/disko.nix | |
parent | d9317de584c66b068a336889aa9adc3ac3837e5e (diff) |
changed password age to hash, add disko configuration for use with nixos-anywhere
Diffstat (limited to 'hosts/disko.nix')
-rw-r--r-- | hosts/disko.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/hosts/disko.nix b/hosts/disko.nix new file mode 100644 index 0000000..0a0710e --- /dev/null +++ b/hosts/disko.nix @@ -0,0 +1,49 @@ +# Example to create a bios compatible gpt partition +{ lib, disks, ... }: { + disk = lib.genAttrs disks (dev: { + device = dev; + type = "disk"; + content = { + type = "table"; + format = "gpt"; + partitions = [ + { + type = "partition"; + name = "boot"; + start = "1MiB"; + end = "100MiB"; + bootable = true; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + } + { + name = "nix"; + type = "partition"; + start = "128MiB"; + end = "100%"; + content = { + type = "btrfs"; + extraArgs = "-f"; # Override existing partition + subvolumes = { + "/nix" = { + mountOptions = ["noatime" "compress=zstd"] + } + }; + }; + } + ] + }; + }); + + nodev = { + "/" = { + fsType = "tmpfs"; + mountOptions = [ + "size=200M" + ]; + }; + }; +} \ No newline at end of file |