Move the data-share into an option
This commit is contained in:
parent
3adf92c574
commit
63d21709c4
|
@ -35,7 +35,6 @@ custom.inputs.nixpkgs.lib.nixosSystem {
|
|||
{ inherit custom hostname; })
|
||||
|
||||
# Common configuration
|
||||
(import "${custom.inputs.self}/modules/common" { inherit custom; })
|
||||
(import "${custom.inputs.self}/modules/default.nix" { inherit custom; })
|
||||
"${custom.inputs.self}/hardware/default.nix"
|
||||
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.services.az-data-share;
|
||||
in
|
||||
{
|
||||
fileSystems."/mnt/data" = {
|
||||
device = "10.7.89.108:server_data";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=300" "noatime" "nfsvers=4.0" ];
|
||||
options = {
|
||||
services.az-data-share.enable = lib.mkEnableOption "Enable the server data FNS share";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
fileSystems."/mnt/data" = {
|
||||
device = "10.7.89.108:server_data";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=300" "noatime" "nfsvers=4.0" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
imports = [
|
||||
./common
|
||||
./common-x86
|
||||
./data-share
|
||||
./eog
|
||||
./lockscreen
|
||||
./makemkv
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
inherit custom hostname;
|
||||
})
|
||||
"${custom.inputs.self}/modules/docker"
|
||||
"${custom.inputs.self}/modules/data-share"
|
||||
"${custom.inputs.self}/modules/logs-share"
|
||||
"${custom.inputs.self}/modules/nix-direnv"
|
||||
(import "${custom.inputs.self}/modules/rclone-webdav" { inherit custom; })
|
||||
|
@ -25,4 +24,5 @@
|
|||
options = [ "x-systemd.automount" "noauto" "noatime" "uid=1000" "gid=100" ];
|
||||
};
|
||||
};
|
||||
services.az-data-share.enable = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue