WIP framenix
This commit is contained in:
parent
317aeb248e
commit
bb61531df1
5 changed files with 119 additions and 1 deletions
44
hosts/framenix/storage.nix
Normal file
44
hosts/framenix/storage.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
fsOptions = [ "noatime" "ssd" "compress=zstd" ];
|
||||
in
|
||||
{
|
||||
boot.initrd.luks = {
|
||||
devices =
|
||||
# allow discards on all devices
|
||||
builtins.mapAttrs (name: val: val // {allowDiscards = true;})
|
||||
{
|
||||
"system".device = "/dev/disk/by-uuid/1838cdc5-9b0b-4c46-9f23-9465549eeb92";
|
||||
"cryptswap".device = "/dev/disk/by-uuid/ded7d649-ab3a-42ee-ae4a-f8c4ba029e9c";
|
||||
};
|
||||
reusePassphrases = true;
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/22388786-4285-403b-9994-e9aae1f11172";
|
||||
fsType = "btrfs";
|
||||
options = fsOptions ++ [ "subvol=nixos_root" ];
|
||||
};
|
||||
|
||||
"/home" = {
|
||||
device = "/dev/disk/by-uuid/22388786-4285-403b-9994-e9aae1f11172";
|
||||
fsType = "btrfs";
|
||||
options = fsOptions ++ [ "subvol=home" ];
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/AF8E-E9E6";
|
||||
fsType = "vfat";
|
||||
options = [ "discard" ];
|
||||
};
|
||||
};
|
||||
|
||||
services.fstrim.enable = true;
|
||||
services.btrfs.autoScrub = {
|
||||
enable = true;
|
||||
fileSystems = [ "/" "/home" ];
|
||||
};
|
||||
|
||||
boot.tmp.useTmpfs = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue