You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nixos-template-base/options.nix

79 lines
2.2 KiB
Nix

{ config, lib, pkgs, r6d, ... }:
let
inherit (lib) mkEnableOption mkTextOption mkIf mkMerge mkOption singleton types;
# TODO: Anglish :)
machineOptions = types.submodule {
options = {
configuration-flags = types.submodule r6d.config-generator;
profiles = types.submodule r6d.profiles;
ipAddress = mkOption {
description = "Adresse IP";
type = lib.types.string;
};
nix-serve-server = mkEnableOption "nix-serve server";
nix-serve-client = mkEnableOption "nix-serve client";
tinc = {
enable = mkEnableOption "Enable tinc service";
connectToAddress = mkOption {
default = "";
example = "192.168.1.1";
description = "External address to connect from another node.";
type = lib.types.string;
};
vpnAddress = mkOption {
example = "192.168.69.69/24";
description = "VPN local node IP address.";
type = lib.types.string;
};
vpnCidrLength = mkOption {
default = 24;
example = 24;
description = "VPN netmask length.";
type = lib.types.int;
};
extraConfig = mkOption {
default = "";
example = ''
Mode = router
ConnecTo = bar
'';
description = "Configuration supplémentaire pour tinc";
type = lib.types.string;
};
};
windowsBoot = {
enable = mkEnableOption "Activation du démarrage de Windows par Grub";
drive = mkOption {
description = "Lecteur sur lequel est présent le système Windows (au format GRUB)";
type = lib.types.string;
default = "hd0,1";
};
};
windowsMount ={
enable = mkEnableOption "Montage de la partition data Windows";
device = mkOption {
description = "Lecteur sur lequel est présent le disque de data Windows";
type = lib.types.string;
default = "/dev/sda2";
};
};
};
};
in
{
options = {
r6d.machines = mkOption {
type = types.attrsOf machineOptions;
description = ''
Machines directory.
'';
};
};
}