mirror of https://gitlab.crans.org/nounous/nixos
Ajout options montages NFS
parent
6911328c59
commit
e2eb62df7d
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
resticClient.when = "01:23";
|
resticClient.when = "01:23";
|
||||||
|
|
||||||
homeNounou.enable = false;
|
nfs.homeNounou.enable = false;
|
||||||
|
|
||||||
users.root.passwordFile = ../../../secrets/apprentix/root.age;
|
users.root.passwordFile = ../../../secrets/apprentix/root.age;
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nfs = {
|
||||||
|
video.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
resticClient.when = "05:32";
|
resticClient.when = "05:32";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,9 @@ in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./age.nix
|
./age.nix
|
||||||
./home.nix
|
|
||||||
./locale.nix
|
./locale.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
./nfs.nix
|
||||||
./ntp.nix
|
./ntp.nix
|
||||||
./restic_client.nix
|
./restic_client.nix
|
||||||
./monitoring.nix
|
./monitoring.nix
|
||||||
|
@ -27,7 +27,9 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
crans = {
|
crans = {
|
||||||
homeNounou.enable = lib.mkDefault true;
|
nfs = {
|
||||||
|
homeNounou.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
monitoring.enable = true;
|
monitoring.enable = true;
|
||||||
networking = {
|
networking = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.crans.homeNounou;
|
|
||||||
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
|
||||||
options.crans.homeNounou = {
|
|
||||||
enable = mkEnableOption "Monter /home_nounou.";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
fileSystems.home_nounou = {
|
|
||||||
mountPoint = "/home_nounou";
|
|
||||||
device = "172.16.10.1:/pool/home";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [
|
|
||||||
"rw"
|
|
||||||
"nosuid"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.crans.nfs;
|
||||||
|
|
||||||
|
inherit (lib) mkEnableOption mkIf;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
options.crans.nfs = {
|
||||||
|
homeAdh.enable = mkEnableOption "Monter /pool/home depuis cameron.";
|
||||||
|
homeNounou.enable = mkEnableOption "Monter /home_nounou depuis tealc.";
|
||||||
|
mail.enable = mkEnableOption "Monter /pool/mail depuis cameron.";
|
||||||
|
video.enable = mkEnableOption "Monter /pool/video depuis cameron.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
fileSystems = {
|
||||||
|
home-adh = mkIf cfg.homeAdh.enable {
|
||||||
|
mountPoint = "/home-adh";
|
||||||
|
device = "172.16.4.2:/pool/home";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"rw"
|
||||||
|
"nosuid"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
home_nounou = mkIf cfg.homeNounou.enable {
|
||||||
|
mountPoint = "/home_nounou";
|
||||||
|
device = "172.16.10.1:/pool/home";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"rw"
|
||||||
|
"nosuid"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
mail = mkIf cfg.mail.enable {
|
||||||
|
mountPoint = "/mail";
|
||||||
|
device = "172.16.4.2:/pool/mail";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"rw"
|
||||||
|
"nosuid"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
video = mkIf cfg.video.enable {
|
||||||
|
mountPoint = "/video";
|
||||||
|
device = "172.16.4.2:/pool/video";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [
|
||||||
|
"rw"
|
||||||
|
"nosuid"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue