Add volumes
parent
c1ed3a522c
commit
417a9393a6
|
@ -1,6 +1,6 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
url-overlay = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo/archive/master.tar.gz";
|
||||
url-overlay = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo/archive/graphql.tar.gz";
|
||||
nix-overlay = (import (builtins.fetchTarball url-overlay));
|
||||
in
|
||||
{
|
||||
|
|
|
@ -163,5 +163,15 @@ in
|
|||
type = types.nullOr (types.listOf (types.attrsOf types.anything));
|
||||
default = [ ];
|
||||
};
|
||||
##############
|
||||
# Volumes #
|
||||
##############
|
||||
volumes = mkOption {
|
||||
description = ''
|
||||
Volumes that will be created on the server
|
||||
'';
|
||||
type = types.nullOr (types.listOf (types.attrsOf types.anything));
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -45,5 +45,6 @@ in
|
|||
passwordAuthentication = lib.attrsets.attrByPath [ "ssh" "passwordAuthentication" ] true jsonData;
|
||||
};
|
||||
users = lib.attrsets.attrByPath [ "users" ] [ ] jsonData;
|
||||
volumes = lib.attrsets.attrByPath [ "volumes" ] [ ] jsonData;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
cfg = config.services.userdata;
|
||||
in
|
||||
{
|
||||
fileSystems = {
|
||||
builtins.listToAttrs (builtins.map
|
||||
(volume: {
|
||||
name: "${volume.mountPoint}";
|
||||
value: {
|
||||
device = "${volume.device}";
|
||||
fsType = "${volume.fsType}";
|
||||
};
|
||||
})
|
||||
cfg.volumes);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue