liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

default.nix (1110B)


      1 ## Mount
      2 ##
      3 ## Mount filesystems
      4 
      5 
      6 { lib, pkgs, config, ...}:
      7 let
      8   inherit (lib) mkOption types;
      9   inherit (pkgs) liminix;
     10   mkBoolOption = description : mkOption {
     11     type = types.bool;
     12     inherit description;
     13     default = true;
     14   };
     15 
     16 in {
     17   options = {
     18     system.service.mount = mkOption {
     19       type = liminix.lib.types.serviceDefn;
     20     };
     21   };
     22   config.system.service = {
     23     mount = liminix.callService ./service.nix {
     24       device = mkOption {
     25         type = types.str;
     26         example = "/dev/sda1";
     27       };
     28       mountpoint = mkOption {
     29         type = types.str;
     30         example = "/mnt/media";
     31       };
     32       options = mkOption {
     33         type = types.listOf types.str;
     34         default = [];
     35         example = ["noatime" "ro" "sync"];
     36       };
     37       fstype = mkOption {
     38         type = types.str;
     39         default = "auto";
     40         example = "vfat";
     41       };
     42     };
     43   };
     44   config.programs.busybox  = {
     45     applets = ["blkid" "findfs"];
     46     options = {
     47       FEATURE_BLKID_TYPE = "y";
     48       FEATURE_MOUNT_FLAGS = "y";
     49       FEATURE_MOUNT_LABEL = "y";
     50       FEATURE_VOLUMEID_EXT = "y";
     51     };
     52   };
     53 }