19 lines
405 B
Nix
19 lines
405 B
Nix
{ lib, config, ... }:
|
|
let cfg = config.custom.dataDisk;
|
|
in {
|
|
options = {
|
|
custom = {
|
|
dataDisk.enable = lib.mkOption {
|
|
default = false;
|
|
type = lib.types.bool;
|
|
description = ''
|
|
Whether to automatically mount /dev/sda1 on /mnt/data
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
fileSystems."/mnt/data" = { device = "/dev/sda1"; };
|
|
};
|
|
}
|