From a7d298aaf7268cfd84b323e0e6ab5c63bba7e96b Mon Sep 17 00:00:00 2001 From: pigeonmoelleux Date: Sat, 7 Dec 2024 16:17:38 +0100 Subject: [PATCH] Retrait home_nounou sur apprentix --- hosts/vm/apprentix/default.nix | 4 +++- modules/crans/default.nix | 1 + modules/crans/home.nix | 39 +++++++++++++++++++++++----------- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/hosts/vm/apprentix/default.nix b/hosts/vm/apprentix/default.nix index 8617d06..972dfe6 100644 --- a/hosts/vm/apprentix/default.nix +++ b/hosts/vm/apprentix/default.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, lib, ... }: { imports = [ @@ -27,5 +27,7 @@ hashedPasswordFile = config.sops.secrets.root-passwd-hash.path; }; + crans.home_nounou.enable = false; + system.stateVersion = "24.11"; } diff --git a/modules/crans/default.nix b/modules/crans/default.nix index a7a2aeb..23f1492 100644 --- a/modules/crans/default.nix +++ b/modules/crans/default.nix @@ -28,6 +28,7 @@ programs.vim.enable = true; environment.systemPackages = with pkgs; [ + nfs-utils shelldap ]; } diff --git a/modules/crans/home.nix b/modules/crans/home.nix index 13bbe94..0ae6c23 100644 --- a/modules/crans/home.nix +++ b/modules/crans/home.nix @@ -1,17 +1,32 @@ -{ pkgs, ... }: +{ + pkgs, + lib, + config, + ... +}: + +let + cfg = config.crans.home_nounou; +in { - fileSystems.home_nounou = { - mountPoint = "/home_nounou"; - device = "172.16.10.1:/pool/home"; - fsType = "nfs"; - options = [ - "rw" - "nosuid" - ]; + options.crans.home_nounou = { + enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Monter les home nounous"; + }; }; - environment.systemPackages = with pkgs; [ - nfs-utils - ]; + config = lib.mkIf cfg.enable { + fileSystems.home_nounou = { + mountPoint = "/home_nounou"; + device = "172.16.10.1:/pool/home"; + fsType = "nfs"; + options = [ + "rw" + "nosuid" + ]; + }; + }; }