diff --git a/roles/nfs-mounts/default.nix b/roles/nfs-mounts/default.nix index 017a0b2..67be937 100644 --- a/roles/nfs-mounts/default.nix +++ b/roles/nfs-mounts/default.nix @@ -8,6 +8,21 @@ in { options.roles.nfs-mounts = { enable = mkEnableOption "Enable default NFS mounts"; + server = mkOption { + type = types.str; + default = "10.0.0.43"; + description = "IP address or hostname of the NFS server"; + }; + remotePath = mkOption { + type = types.str; + default = "/media"; + description = "Remote path to mount from the NFS server"; + }; + mountPoint = mkOption { + type = types.str; + default = "/media"; + description = "Local mount point for the NFS share"; + }; # TODO: implement requireMount requireMount = mkOption { type = types.bool; @@ -18,8 +33,8 @@ in config = mkIf cfg.enable { - fileSystems."/media" = { - device = "10.0.0.43:/media"; + fileSystems.${cfg.mountPoint} = { + device = "${cfg.server}:${cfg.remotePath}"; fsType = "nfs"; options = [ "defaults" diff --git a/roles/printing/default.nix b/roles/printing/default.nix index 4813bca..bedf865 100644 --- a/roles/printing/default.nix +++ b/roles/printing/default.nix @@ -8,6 +8,21 @@ in { options.roles.printing = { enable = mkEnableOption "Enable default printing setup"; + printerName = mkOption { + type = types.str; + default = "MFC-L8900CDW_series"; + description = "Name for the default printer"; + }; + printerUri = mkOption { + type = types.str; + default = "ipp://brother.oglehome/ipp/print"; + description = "Device URI for the default printer (e.g., ipp://hostname/ipp/print)"; + }; + printerModel = mkOption { + type = types.str; + default = "everywhere"; + description = "PPD model for the printer (use 'everywhere' for driverless IPP)"; + }; }; config = mkIf cfg.enable @@ -21,11 +36,11 @@ in }; hardware.printers.ensurePrinters = [{ - name = "MFC-L8900CDW_series"; - deviceUri = "ipp://brother.oglehome/ipp/print"; - model = "everywhere"; + name = cfg.printerName; + deviceUri = cfg.printerUri; + model = cfg.printerModel; }]; - hardware.printers.ensureDefaultPrinter = "MFC-L8900CDW_series"; + hardware.printers.ensureDefaultPrinter = cfg.printerName; # Fix ensure-printers service to wait for network availability systemd.services.ensure-printers = { diff --git a/roles/virtualisation/default.nix b/roles/virtualisation/default.nix index 5e362d7..52779e7 100644 --- a/roles/virtualisation/default.nix +++ b/roles/virtualisation/default.nix @@ -8,6 +8,11 @@ in { options.roles.virtualisation = { enable = mkEnableOption "Enable virtualisation"; + dockerUsers = mkOption { + type = types.listOf types.str; + default = [ "johno" ]; + description = "List of users to add to the docker group"; + }; }; config = mkIf cfg.enable @@ -15,6 +20,6 @@ in virtualisation.libvirtd.enable = true; programs.virt-manager.enable = true; virtualisation.docker.enable = true; - users.extraGroups.docker.members = [ "johno" ]; + users.extraGroups.docker.members = cfg.dockerUsers; }; }