Loading nixos/modules/tasks/filesystems.nix +28 −10 Original line number Diff line number Diff line Loading @@ -5,11 +5,31 @@ utils, ... }@moduleArgs: with lib; with utils; let inherit (lib) any attrValues concatMapStrings concatMapStringsSep concatStringsSep elem filter flip head literalExpression mkDefault mkEnableOption mkIf mkMerge mkOption optional optionalAttrs optionalString toposort types ; inherit (utils) fsBefore; # https://wiki.archlinux.org/index.php/fstab#Filepath_spaces escape = string: builtins.replaceStrings [ " " "\t" ] [ "\\040" "\\011" ] string; Loading Loading @@ -61,7 +81,7 @@ let description = "Location of the mounted file system."; }; stratis.poolUuid = lib.mkOption { stratis.poolUuid = mkOption { type = types.uniq (types.nullOr types.str); description = '' UUID of the stratis pool that the fs is located in Loading Loading @@ -166,9 +186,7 @@ let }; config.device = lib.mkIf (config.label != null) ( lib.mkDefault "/dev/disk/by-label/${escape config.label}" ); config.device = mkIf (config.label != null) (mkDefault "/dev/disk/by-label/${escape config.label}"); config.options = let Loading Loading @@ -320,7 +338,7 @@ in boot.supportedFilesystems = mkOption { default = { }; example = lib.literalExpression '' example = literalExpression '' { btrfs = true; zfs = lib.mkForce false; Loading Loading @@ -471,7 +489,7 @@ in # Filesystems. ${makeFstabEntries fileSystems { }} ${lib.optionalString (config.swapDevices != [ ]) "# Swap devices."} ${optionalString (config.swapDevices != [ ]) "# Swap devices."} ${flip concatMapStrings config.swapDevices (sw: "${sw.realDevice} none swap ${swapOptions sw}\n")} ''; Loading Loading
nixos/modules/tasks/filesystems.nix +28 −10 Original line number Diff line number Diff line Loading @@ -5,11 +5,31 @@ utils, ... }@moduleArgs: with lib; with utils; let inherit (lib) any attrValues concatMapStrings concatMapStringsSep concatStringsSep elem filter flip head literalExpression mkDefault mkEnableOption mkIf mkMerge mkOption optional optionalAttrs optionalString toposort types ; inherit (utils) fsBefore; # https://wiki.archlinux.org/index.php/fstab#Filepath_spaces escape = string: builtins.replaceStrings [ " " "\t" ] [ "\\040" "\\011" ] string; Loading Loading @@ -61,7 +81,7 @@ let description = "Location of the mounted file system."; }; stratis.poolUuid = lib.mkOption { stratis.poolUuid = mkOption { type = types.uniq (types.nullOr types.str); description = '' UUID of the stratis pool that the fs is located in Loading Loading @@ -166,9 +186,7 @@ let }; config.device = lib.mkIf (config.label != null) ( lib.mkDefault "/dev/disk/by-label/${escape config.label}" ); config.device = mkIf (config.label != null) (mkDefault "/dev/disk/by-label/${escape config.label}"); config.options = let Loading Loading @@ -320,7 +338,7 @@ in boot.supportedFilesystems = mkOption { default = { }; example = lib.literalExpression '' example = literalExpression '' { btrfs = true; zfs = lib.mkForce false; Loading Loading @@ -471,7 +489,7 @@ in # Filesystems. ${makeFstabEntries fileSystems { }} ${lib.optionalString (config.swapDevices != [ ]) "# Swap devices."} ${optionalString (config.swapDevices != [ ]) "# Swap devices."} ${flip concatMapStrings config.swapDevices (sw: "${sw.realDevice} none swap ${swapOptions sw}\n")} ''; Loading