feat(fs): add configuration for xfs, ext4, btrfs
This commit is contained in:
parent
00a1576803
commit
6517ca329d
4 changed files with 130 additions and 0 deletions
22
faucet/fs/btrfs.nix
Normal file
22
faucet/fs/btrfs.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, ... }: with lib; let
|
||||
cfg = config.faucet.fs;
|
||||
in {
|
||||
options.faucet.fs.btrfs = {
|
||||
options = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ "noatime" "compress=zstd" ];
|
||||
description = "btrfs mount options";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.type == "btrfs") {
|
||||
fileSystems."/nix" =
|
||||
{ inherit (cfg.btrfs) options;
|
||||
device = "/dev/disk/by-uuid/${cfg.store}";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue