118 lines
2.5 KiB
Nix
Raw Normal View History

2024-04-14 07:57:07 +02:00
{ inputs, lib, ... }:
let
userOpt = with lib; {
2023-11-04 02:28:27 +01:00
username = mkOption { type = types.str; };
2024-04-14 07:57:07 +02:00
wm = mkOption {
2024-04-14 22:45:21 +02:00
type = types.enum [ "Wayland" "X11" "-" ];
2024-04-14 22:24:23 +02:00
default = "-";
2024-04-14 07:57:07 +02:00
};
git = {
username = mkOption { type = types.str; };
email = mkOption { type = types.str; };
key = mkOption { type = types.str; };
};
};
2024-04-15 18:34:14 +02:00
netOpt = with lib; {
2024-04-16 01:28:24 +02:00
ble = {
enable = mkOption {
type = types.bool;
default = false;
};
};
2024-04-15 18:34:14 +02:00
wlp = {
enable = mkOption {
2023-11-04 02:28:27 +01:00
type = types.bool;
default = false;
};
2024-04-15 18:34:14 +02:00
nif = mkOption {
type = types.str;
default = "";
2023-11-04 02:28:27 +01:00
};
2024-04-15 18:34:14 +02:00
};
wg = {
enable = mkOption {
2023-11-04 02:28:27 +01:00
type = types.bool;
default = false;
};
2024-04-15 18:34:14 +02:00
ip4 = mkOption {
type = types.str;
default = "";
2023-11-04 02:28:27 +01:00
};
2024-04-15 18:34:14 +02:00
ip6 = mkOption {
type = types.str;
default = "";
2024-01-19 11:58:52 +01:00
};
2023-11-04 02:28:27 +01:00
};
2024-04-15 18:34:14 +02:00
};
makeOpt = with lib; {
cli = mkOption {
type = types.bool;
default = true;
};
gui = mkOption {
type = types.bool;
default = false;
};
virt = mkOption {
type = types.bool;
default = true;
};
power = mkOption {
type = types.bool;
default = false;
};
game = mkOption {
type = types.bool;
default = false;
};
develop = mkOption {
type = types.bool;
default = false;
2023-11-04 02:28:27 +01:00
};
2024-04-15 18:34:14 +02:00
};
serverOpt = with lib; {
2024-04-16 01:28:24 +02:00
hostDomain = mkOption { type = types.str; };
mailDomain = mkOption { type = types.str; };
mailServer = mkOption { type = types.str; };
2024-04-15 18:34:14 +02:00
2024-04-16 01:28:24 +02:00
dbHost = mkOption {
type = types.str;
default = "localhost";
};
dbPort = mkOption {
type = types.str;
default = "3306";
};
configPath = mkOption {
type = types.str;
default = "/media/config";
};
dataPath = mkOption {
type = types.str;
default = "/media/data";
};
2024-04-15 18:34:14 +02:00
};
in with lib; {
options.usercfg = userOpt;
options.syscfg = {
hostname = mkOption { type = types.str; };
2024-04-17 00:25:54 +02:00
type = mkOption {
type = types.enum [ "nixos" "macos" "home" ];
default = "nixos";
};
system = mkOption {
type = types.enum [ "x86_64-linux" "x86_64-darwin" "-" ];
default = "x86_64-linux";
};
2024-04-15 18:34:14 +02:00
defaultUser = mkOption { type = types.str; };
make = makeOpt;
net = netOpt;
2024-04-14 07:57:07 +02:00
users = mkOption {
type = types.listOf (types.submodule { options = userOpt; });
default = [ ];
};
2023-11-04 02:28:27 +01:00
};
}