mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/services.orangefs.client: remove with lib;
This commit is contained in:
parent
e14a371aac
commit
6f4eeb7722
1 changed files with 14 additions and 17 deletions
|
@ -1,7 +1,4 @@
|
||||||
{ config, lib, pkgs, ...} :
|
{ config, lib, pkgs, ...} :
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.orangefs.client;
|
cfg = config.services.orangefs.client;
|
||||||
|
|
||||||
|
@ -10,15 +7,15 @@ in {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.orangefs.client = {
|
services.orangefs.client = {
|
||||||
enable = mkEnableOption "OrangeFS client daemon";
|
enable = lib.mkEnableOption "OrangeFS client daemon";
|
||||||
|
|
||||||
extraOptions = mkOption {
|
extraOptions = lib.mkOption {
|
||||||
type = with types; listOf str;
|
type = with lib.types; listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Extra command line options for pvfs2-client.";
|
description = "Extra command line options for pvfs2-client.";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems = mkOption {
|
fileSystems = lib.mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
The orangefs file systems to be mounted.
|
The orangefs file systems to be mounted.
|
||||||
This option is preferred over using {option}`fileSystems` directly since
|
This option is preferred over using {option}`fileSystems` directly since
|
||||||
|
@ -30,23 +27,23 @@ in {
|
||||||
target = "tcp://server:3334/orangefs";
|
target = "tcp://server:3334/orangefs";
|
||||||
}];
|
}];
|
||||||
|
|
||||||
type = with types; listOf (submodule ({ ... } : {
|
type = with lib.types; listOf (submodule ({ ... } : {
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
mountPoint = mkOption {
|
mountPoint = lib.mkOption {
|
||||||
type = types.str;
|
type = lib.types.str;
|
||||||
default = "/orangefs";
|
default = "/orangefs";
|
||||||
description = "Mount point.";
|
description = "Mount point.";
|
||||||
};
|
};
|
||||||
|
|
||||||
options = mkOption {
|
options = lib.mkOption {
|
||||||
type = with types; listOf str;
|
type = with lib.types; listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Mount options";
|
description = "Mount options";
|
||||||
};
|
};
|
||||||
|
|
||||||
target = mkOption {
|
target = lib.mkOption {
|
||||||
type = types.str;
|
type = lib.types.str;
|
||||||
example = "tcp://server:3334/orangefs";
|
example = "tcp://server:3334/orangefs";
|
||||||
description = "Target URL";
|
description = "Target URL";
|
||||||
};
|
};
|
||||||
|
@ -59,7 +56,7 @@ in {
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = [ pkgs.orangefs ];
|
environment.systemPackages = [ pkgs.orangefs ];
|
||||||
|
|
||||||
boot.supportedFilesystems = [ "pvfs2" ];
|
boot.supportedFilesystems = [ "pvfs2" ];
|
||||||
|
@ -74,7 +71,7 @@ in {
|
||||||
|
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.orangefs}/bin/pvfs2-client-core \
|
${pkgs.orangefs}/bin/pvfs2-client-core \
|
||||||
--logtype=syslog ${concatStringsSep " " cfg.extraOptions}
|
--logtype=syslog ${lib.concatStringsSep " " cfg.extraOptions}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
TimeoutStopSec = "120";
|
TimeoutStopSec = "120";
|
||||||
|
@ -87,7 +84,7 @@ in {
|
||||||
bindsTo = [ "orangefs-client.service" ];
|
bindsTo = [ "orangefs-client.service" ];
|
||||||
wantedBy = [ "remote-fs.target" ];
|
wantedBy = [ "remote-fs.target" ];
|
||||||
type = "pvfs2";
|
type = "pvfs2";
|
||||||
options = concatStringsSep "," fs.options;
|
options = lib.concatStringsSep "," fs.options;
|
||||||
what = fs.target;
|
what = fs.target;
|
||||||
where = fs.mountPoint;
|
where = fs.mountPoint;
|
||||||
}) cfg.fileSystems;
|
}) cfg.fileSystems;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue