mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-10-15 11:27:18 +02:00
treewide: remove 'with lib;'
This commit is contained in:
parent
cf54323dc7
commit
78ae241387
53 changed files with 245 additions and 245 deletions
|
@ -8,8 +8,8 @@ let
|
|||
cfg = config.my.hardware.bluetooth;
|
||||
in
|
||||
{
|
||||
options.my.hardware.bluetooth = with lib; {
|
||||
enable = mkEnableOption "bluetooth configuration";
|
||||
options.my.hardware.bluetooth = {
|
||||
enable = lib.mkEnableOption "bluetooth configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -8,8 +8,8 @@ let
|
|||
cfg = config.my.hardware.debug;
|
||||
in
|
||||
{
|
||||
options.my.hardware.debug = with lib; {
|
||||
enable = mkEnableOption "hardware-debug configuration";
|
||||
options.my.hardware.debug = {
|
||||
enable = lib.mkEnableOption "hardware-debug configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -3,11 +3,11 @@ let
|
|||
cfg = config.my.hardware.drive-monitor;
|
||||
in
|
||||
{
|
||||
options.my.hardware.drive-monitor = with lib; {
|
||||
enable = mkEnableOption "drive-monitor configuration";
|
||||
options.my.hardware.drive-monitor = {
|
||||
enable = lib.mkEnableOption "drive-monitor configuration";
|
||||
|
||||
OnFailureMail = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
OnFailureMail = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Mail address where to send the error report";
|
||||
default = null;
|
||||
example = "alarm@mail.com";
|
||||
|
|
|
@ -3,16 +3,16 @@ let
|
|||
cfg = config.my.hardware.firmware;
|
||||
in
|
||||
{
|
||||
options.my.hardware.firmware = with lib; {
|
||||
enable = mkEnableOption "firmware configuration";
|
||||
options.my.hardware.firmware = {
|
||||
enable = lib.mkEnableOption "firmware configuration";
|
||||
|
||||
cpuFlavor = mkOption {
|
||||
type =
|
||||
with types;
|
||||
nullOr (enum [
|
||||
cpuFlavor = lib.mkOption {
|
||||
type = lib.types.nullOr (
|
||||
lib.types.enum [
|
||||
"intel"
|
||||
"amd"
|
||||
]);
|
||||
]
|
||||
);
|
||||
default = null;
|
||||
example = "intel";
|
||||
description = "Which kind of CPU to activate micro-code updates";
|
||||
|
|
|
@ -8,15 +8,15 @@ let
|
|||
cfg = config.my.hardware.graphics;
|
||||
in
|
||||
{
|
||||
options.my.hardware.graphics = with lib; {
|
||||
enable = mkEnableOption "graphics configuration";
|
||||
cpuFlavor = mkOption {
|
||||
type =
|
||||
with types;
|
||||
nullOr (enum [
|
||||
options.my.hardware.graphics = {
|
||||
enable = lib.mkEnableOption "graphics configuration";
|
||||
cpuFlavor = lib.mkOption {
|
||||
type = lib.types.nullOr (
|
||||
lib.types.enum [
|
||||
"amd"
|
||||
"intel"
|
||||
]);
|
||||
]
|
||||
);
|
||||
default = null;
|
||||
example = "intel";
|
||||
description = "Which kind of GPU";
|
||||
|
|
|
@ -3,8 +3,8 @@ let
|
|||
cfg = config.my.hardware.id-card;
|
||||
in
|
||||
{
|
||||
options.my.hardware.id-card = with lib; {
|
||||
enable = mkEnableOption "german id card authentication";
|
||||
options.my.hardware.id-card = {
|
||||
enable = lib.mkEnableOption "german id card authentication";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -5,11 +5,11 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.acme = with lib; {
|
||||
enable = mkEnableOption "ACME certificates";
|
||||
options.my.services.acme = {
|
||||
enable = lib.mkEnableOption "ACME certificates";
|
||||
|
||||
credentialsFile = mkOption {
|
||||
type = types.str;
|
||||
credentialsFile = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "/var/lib/acme/creds.env";
|
||||
description = ''
|
||||
INWX API key file as an 'EnvironmentFile' (see `systemd.exec(5)`)
|
||||
|
|
|
@ -10,8 +10,8 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.alertmanager = with lib; {
|
||||
enable = mkEnableOption "Prometheus alertmanager for monitoring";
|
||||
options.my.services.alertmanager = {
|
||||
enable = lib.mkEnableOption "Prometheus alertmanager for monitoring";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -10,11 +10,11 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.aria2 = with lib; {
|
||||
enable = mkEnableOption "Aria2 for downloads";
|
||||
options.my.services.aria2 = {
|
||||
enable = lib.mkEnableOption "Aria2 for downloads";
|
||||
|
||||
downloadDir = mkOption {
|
||||
type = types.path;
|
||||
downloadDir = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = ''
|
||||
Directory to store downloaded files.
|
||||
'';
|
||||
|
|
|
@ -8,59 +8,59 @@ let
|
|||
cfg = config.my.services.backup;
|
||||
in
|
||||
{
|
||||
options.my.services.backup = with lib; {
|
||||
enable = mkEnableOption "Borgbackup Service";
|
||||
options.my.services.backup = {
|
||||
enable = lib.mkEnableOption "Borgbackup Service";
|
||||
|
||||
passwordFile = mkOption {
|
||||
type = types.path;
|
||||
passwordFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "Password for the backup";
|
||||
example = "/run/secrets/password";
|
||||
};
|
||||
|
||||
sshHost = mkOption {
|
||||
type = types.str;
|
||||
sshHost = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "ssh-hostname for remote access";
|
||||
default = "u181505-sub1.your-storagebox.de";
|
||||
example = "test.domain.com";
|
||||
};
|
||||
sshUser = mkOption {
|
||||
type = types.str;
|
||||
sshUser = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "ssh-user for remote access";
|
||||
default = "u181505-sub1";
|
||||
example = "max";
|
||||
};
|
||||
sshPort = mkOption {
|
||||
type = types.port;
|
||||
sshPort = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
description = "ssh-port for remote access";
|
||||
default = 23;
|
||||
example = 22;
|
||||
};
|
||||
sshKeyFile = mkOption {
|
||||
type = types.path;
|
||||
sshKeyFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "ssh-key for remote access";
|
||||
example = "/run/secrets/ssh_key";
|
||||
};
|
||||
|
||||
OnFailureNotification = mkOption {
|
||||
type = types.bool;
|
||||
OnFailureNotification = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = "whether to show a warning to all users or not";
|
||||
default = false;
|
||||
};
|
||||
OnFailureMail = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
OnFailureMail = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Mail address where to send the error report";
|
||||
default = null;
|
||||
example = "alarm@mail.com";
|
||||
};
|
||||
|
||||
paths = mkOption {
|
||||
type = with types; listOf str;
|
||||
paths = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "additional path(s) to back up";
|
||||
default = [ "/" ];
|
||||
example = [ "/home/user" ];
|
||||
};
|
||||
exclude = mkOption {
|
||||
type = with types; listOf str;
|
||||
exclude = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "Exclude paths matching any of the given patterns. See `borg help patterns`";
|
||||
default = [ ];
|
||||
example = [
|
||||
|
@ -69,8 +69,8 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
doInit = mkOption {
|
||||
type = types.bool;
|
||||
doInit = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Run {command}`borg init` if the
|
||||
specified {option}`repo` does not exist.
|
||||
|
|
|
@ -6,8 +6,8 @@ let
|
|||
port = config.services.bazarr.listenPort;
|
||||
in
|
||||
{
|
||||
options.my.services.bazarr = with lib; {
|
||||
enable = mkEnableOption "Bazarr for subtitle management";
|
||||
options.my.services.bazarr = {
|
||||
enable = lib.mkEnableOption "Bazarr for subtitle management";
|
||||
|
||||
apiKeyFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
|
|
|
@ -24,13 +24,13 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
options.my.services.blackbox = with lib; {
|
||||
enable = mkEnableOption "Blackbox prometheus exporter";
|
||||
options.my.services.blackbox = {
|
||||
enable = lib.mkEnableOption "Blackbox prometheus exporter";
|
||||
|
||||
http_endpoints = mkOption {
|
||||
type = types.listOf types.str;
|
||||
http_endpoints = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
example = literalExpression ''
|
||||
example = lib.literalExpression ''
|
||||
[
|
||||
"https://domain.com"
|
||||
"https://another-domain.com"
|
||||
|
|
|
@ -9,20 +9,20 @@ let
|
|||
cfg = config.my.services.blocky;
|
||||
in
|
||||
{
|
||||
options.my.services.blocky = with lib; {
|
||||
enable = mkEnableOption "Blocky DNS Server";
|
||||
options.my.services.blocky = {
|
||||
enable = lib.mkEnableOption "Blocky DNS Server";
|
||||
|
||||
httpPort = mkOption {
|
||||
type = types.port;
|
||||
httpPort = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 8053;
|
||||
example = 8080;
|
||||
description = "port for requests";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
settings = lib.mkOption {
|
||||
inherit (pkgs.formats.json { }) type;
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
example = lib.literalExpression ''
|
||||
{ ports.http = "8053" };
|
||||
'';
|
||||
description = ''
|
||||
|
|
|
@ -5,17 +5,17 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.dyndns = with lib; {
|
||||
enable = mkEnableOption "Dyndns";
|
||||
options.my.services.dyndns = {
|
||||
enable = lib.mkEnableOption "Dyndns";
|
||||
|
||||
username = mkOption {
|
||||
type = types.str;
|
||||
username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Username for the dyndns.";
|
||||
example = "admin";
|
||||
default = "Stunkymonkey-dyndns";
|
||||
};
|
||||
passwordFile = mkOption {
|
||||
type = types.path;
|
||||
passwordFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "Password for the username for dyndns.";
|
||||
example = "/run/secrets/freshrss";
|
||||
};
|
||||
|
|
|
@ -9,11 +9,11 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.finance = with lib; {
|
||||
options.my.services.finance = {
|
||||
enable = lib.mkEnableOption "Finance firefly service.";
|
||||
|
||||
appKeyFile = mkOption {
|
||||
type = types.path;
|
||||
appKeyFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "appkey for the service.";
|
||||
example = "/run/secrets/freshrss";
|
||||
default = "base64:ICs6jizTJnu4U8Sl/+GKIUC6TSK+0i+Lu84CicRhTNE=";
|
||||
|
|
|
@ -10,30 +10,30 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.freshrss = with lib; {
|
||||
options.my.services.freshrss = {
|
||||
enable = lib.mkEnableOption "FreshRSS feed reader";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.freshrss;
|
||||
description = "Which FreshRSS package to use.";
|
||||
};
|
||||
|
||||
defaultUser = mkOption {
|
||||
type = types.str;
|
||||
defaultUser = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "admin";
|
||||
description = "Default username for FreshRSS.";
|
||||
example = "eva";
|
||||
};
|
||||
|
||||
passwordFile = mkOption {
|
||||
type = types.path;
|
||||
passwordFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "Password for the defaultUser for FreshRSS.";
|
||||
example = "/run/secrets/freshrss";
|
||||
};
|
||||
|
||||
language = mkOption {
|
||||
type = types.str;
|
||||
language = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "en";
|
||||
description = "Default language for FreshRSS.";
|
||||
example = "de";
|
||||
|
|
|
@ -8,18 +8,18 @@ let
|
|||
cfg = config.my.services.fritzbox;
|
||||
in
|
||||
{
|
||||
options.my.services.fritzbox = with lib; {
|
||||
enable = mkEnableOption "Fritzbox-Monitoring";
|
||||
options.my.services.fritzbox = {
|
||||
enable = lib.mkEnableOption "Fritzbox-Monitoring";
|
||||
|
||||
username = mkOption {
|
||||
type = types.str;
|
||||
username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "prometheus";
|
||||
example = "admin";
|
||||
description = "Admin username";
|
||||
};
|
||||
|
||||
passwordFile = mkOption {
|
||||
type = types.str;
|
||||
passwordFile = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "/var/lib/fritz/password.txt";
|
||||
description = "password stored in a file";
|
||||
};
|
||||
|
|
|
@ -10,18 +10,18 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.grafana = with lib; {
|
||||
enable = mkEnableOption "Grafana for visualizing";
|
||||
options.my.services.grafana = {
|
||||
enable = lib.mkEnableOption "Grafana for visualizing";
|
||||
|
||||
username = mkOption {
|
||||
type = types.str;
|
||||
username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "felix";
|
||||
example = "admin";
|
||||
description = "Admin username";
|
||||
};
|
||||
|
||||
passwordFile = mkOption {
|
||||
type = types.str;
|
||||
passwordFile = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "/var/lib/grafana/password.txt";
|
||||
description = "Admin password stored in a file";
|
||||
};
|
||||
|
|
|
@ -10,10 +10,10 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.hedgedoc = with lib; {
|
||||
enable = mkEnableOption "Hedgedoc Music Server";
|
||||
options.my.services.hedgedoc = {
|
||||
enable = lib.mkEnableOption "Hedgedoc Music Server";
|
||||
|
||||
settings = mkOption {
|
||||
settings = lib.mkOption {
|
||||
inherit (pkgs.formats.json { }) type;
|
||||
default = { };
|
||||
example = {
|
||||
|
|
|
@ -10,14 +10,14 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.home-automation = with lib; {
|
||||
enable = mkEnableOption "home-assistant server";
|
||||
options.my.services.home-automation = {
|
||||
enable = lib.mkEnableOption "home-assistant server";
|
||||
|
||||
package = lib.mkPackageOption pkgs "home-assistant" { };
|
||||
|
||||
extraComponents = mkOption {
|
||||
type = types.listOf (types.enum cfg.package.availableComponents);
|
||||
example = literalExpression ''
|
||||
extraComponents = lib.mkOption {
|
||||
type = lib.types.listOf (lib.types.enum cfg.package.availableComponents);
|
||||
example = lib.literalExpression ''
|
||||
[
|
||||
"analytics"
|
||||
"default_config"
|
||||
|
@ -41,8 +41,8 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
latitude = mkOption {
|
||||
type = types.nullOr (types.either types.float types.str);
|
||||
latitude = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.either lib.types.float lib.types.str);
|
||||
default = null;
|
||||
example = 52.3;
|
||||
description = ''
|
||||
|
@ -50,8 +50,8 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
longitude = mkOption {
|
||||
type = types.nullOr (types.either types.float types.str);
|
||||
longitude = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.either lib.types.float lib.types.str);
|
||||
default = null;
|
||||
example = 4.9;
|
||||
description = ''
|
||||
|
@ -59,16 +59,16 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
elevation = mkOption {
|
||||
type = types.nullOr (types.either types.float types.str);
|
||||
elevation = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.either lib.types.float lib.types.str);
|
||||
default = null;
|
||||
description = ''
|
||||
your location elevation. Impacts sunrise data.
|
||||
'';
|
||||
};
|
||||
|
||||
timezone = mkOption {
|
||||
type = types.str;
|
||||
timezone = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "GMT";
|
||||
description = ''
|
||||
your timezone.
|
||||
|
|
|
@ -10,8 +10,8 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.homepage = with lib; {
|
||||
enable = mkEnableOption "Stunkymonkey-Hompage";
|
||||
options.my.services.homepage = {
|
||||
enable = lib.mkEnableOption "Stunkymonkey-Hompage";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -19,8 +19,8 @@ in
|
|||
{
|
||||
imports = [ ./config.nix ];
|
||||
|
||||
options.my.services.homer = with lib; {
|
||||
enable = mkEnableOption "Homer Dashboard";
|
||||
options.my.services.homer = {
|
||||
enable = lib.mkEnableOption "Homer Dashboard";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -4,8 +4,8 @@ let
|
|||
cfg = config.my.services.initrd-ssh;
|
||||
in
|
||||
{
|
||||
options.my.services.initrd-ssh = with lib; {
|
||||
enable = mkEnableOption "Enable initrd-ssh service";
|
||||
options.my.services.initrd-ssh = {
|
||||
enable = lib.mkEnableOption "Enable initrd-ssh service";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -19,8 +19,8 @@ let
|
|||
});
|
||||
in
|
||||
{
|
||||
options.my.services.jellyfin = with lib; {
|
||||
enable = mkEnableOption "Jellyfin Media Server";
|
||||
options.my.services.jellyfin = {
|
||||
enable = lib.mkEnableOption "Jellyfin Media Server";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -5,8 +5,8 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.jellyseerr = with lib; {
|
||||
enable = mkEnableOption "Sonarr for films management";
|
||||
options.my.services.jellyseerr = {
|
||||
enable = lib.mkEnableOption "Sonarr for films management";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -11,35 +11,35 @@ let
|
|||
port = 3101;
|
||||
in
|
||||
{
|
||||
options.my.services.loki = with lib; {
|
||||
enable = mkEnableOption "loki log monitoring";
|
||||
options.my.services.loki = {
|
||||
enable = lib.mkEnableOption "loki log monitoring";
|
||||
|
||||
rules = mkOption {
|
||||
type = types.attrsOf (
|
||||
types.submodule {
|
||||
rules = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
condition = mkOption {
|
||||
type = types.str;
|
||||
condition = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Loki alert expression.
|
||||
'';
|
||||
example = ''count_over_time({job=~"secure"} |="sshd[" |~": Failed|: Invalid|: Connection closed by authenticating user" | __error__="" [15m]) > 15'';
|
||||
default = null;
|
||||
};
|
||||
description = mkOption {
|
||||
type = types.str;
|
||||
description = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Loki alert message.
|
||||
'';
|
||||
example = "Prometheus encountered value {{ $value }} with {{ $labels }}";
|
||||
default = null;
|
||||
};
|
||||
labels = mkOption {
|
||||
type = types.nullOr (types.attrsOf types.str);
|
||||
labels = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.attrsOf lib.types.str);
|
||||
description = ''
|
||||
Additional alert labels.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
example = lib.literalExpression ''
|
||||
{ severity = "page" };
|
||||
'';
|
||||
default = { };
|
||||
|
|
|
@ -8,24 +8,24 @@ let
|
|||
cfg = config.my.services.matrix-bot;
|
||||
in
|
||||
{
|
||||
options.my.services.matrix-bot = with lib; {
|
||||
enable = mkEnableOption "enable matrix forwarding bot";
|
||||
Username = mkOption {
|
||||
type = types.str;
|
||||
options.my.services.matrix-bot = {
|
||||
enable = lib.mkEnableOption "enable matrix forwarding bot";
|
||||
Username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Matrix bot name.";
|
||||
example = "@bot:matrix.org";
|
||||
default = "@stunkymonkey-bot:matrix.org";
|
||||
};
|
||||
PasswortFile = mkOption {
|
||||
type = types.path;
|
||||
PasswortFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = ''
|
||||
Password for the bot.
|
||||
format: MX_TOKEN=<token>
|
||||
'';
|
||||
example = "/run/secrets/password";
|
||||
};
|
||||
RoomID = mkOption {
|
||||
type = types.str;
|
||||
RoomID = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Matrix room id.";
|
||||
example = "!abcdefghijklmnopqr:matrix.org";
|
||||
default = "!ZWnKiKLuQNBkBGMPCl:matrix.org";
|
||||
|
|
|
@ -9,8 +9,8 @@ let
|
|||
cfg = config.my.services.minecraft-server;
|
||||
in
|
||||
{
|
||||
options.my.services.minecraft-server = with lib; {
|
||||
enable = mkEnableOption "Minecraft Server";
|
||||
options.my.services.minecraft-server = {
|
||||
enable = lib.mkEnableOption "Minecraft Server";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -10,10 +10,10 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.navidrome = with lib; {
|
||||
enable = mkEnableOption "Navidrome Music Server";
|
||||
options.my.services.navidrome = {
|
||||
enable = lib.mkEnableOption "Navidrome Music Server";
|
||||
|
||||
settings = mkOption {
|
||||
settings = lib.mkOption {
|
||||
inherit (pkgs.formats.json { }) type;
|
||||
default = {
|
||||
EnableSharing = true;
|
||||
|
@ -29,8 +29,8 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
musicFolder = mkOption {
|
||||
type = types.str;
|
||||
musicFolder = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "/mnt/music/";
|
||||
description = "Music folder";
|
||||
};
|
||||
|
|
|
@ -10,28 +10,28 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.nextcloud = with lib; {
|
||||
enable = mkEnableOption "Nextcloud";
|
||||
maxSize = mkOption {
|
||||
type = types.str;
|
||||
options.my.services.nextcloud = {
|
||||
enable = lib.mkEnableOption "Nextcloud";
|
||||
maxSize = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "10G";
|
||||
example = "512M";
|
||||
description = "Maximum file upload size";
|
||||
};
|
||||
admin = mkOption {
|
||||
type = types.str;
|
||||
admin = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "felix";
|
||||
example = "admin";
|
||||
description = "Name of the admin user";
|
||||
};
|
||||
default_phone_region = mkOption {
|
||||
type = types.str;
|
||||
default_phone_region = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "DE";
|
||||
example = "US";
|
||||
description = "country codes for automatic phone-number ";
|
||||
};
|
||||
passwordFile = mkOption {
|
||||
type = types.path;
|
||||
passwordFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
example = "/var/lib/nextcloud/password.txt";
|
||||
description = ''
|
||||
Path to a file containing the admin's password, must be readable by
|
||||
|
@ -39,8 +39,8 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
exporterPasswordFile = mkOption {
|
||||
type = types.path;
|
||||
exporterPasswordFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
example = "/var/lib/nextcloud/password.txt";
|
||||
description = ''
|
||||
Path to a file containing the admin's password, must be readable by
|
||||
|
|
|
@ -10,8 +10,8 @@ let
|
|||
cfg = config.my.services.node-exporter;
|
||||
in
|
||||
{
|
||||
options.my.services.node-exporter = with lib; {
|
||||
enable = mkEnableOption "Node-Exporter for monitoring";
|
||||
options.my.services.node-exporter = {
|
||||
enable = lib.mkEnableOption "Node-Exporter for monitoring";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -5,23 +5,23 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.paperless = with lib; {
|
||||
enable = mkEnableOption "Paperless Server";
|
||||
options.my.services.paperless = {
|
||||
enable = lib.mkEnableOption "Paperless Server";
|
||||
|
||||
passwordFile = mkOption {
|
||||
type = types.path;
|
||||
passwordFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "Password for the defaultUser for FreshRSS.";
|
||||
example = "/run/secrets/freshrss";
|
||||
};
|
||||
|
||||
mediaDir = mkOption {
|
||||
type = types.path;
|
||||
mediaDir = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "Location of the FreshRSS data.";
|
||||
example = "/data/docs";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = types.attrs;
|
||||
settings = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
description = "additional extraConfig";
|
||||
};
|
||||
|
|
|
@ -5,10 +5,10 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.passworts = with lib; {
|
||||
enable = mkEnableOption "Passwords Server";
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
options.my.services.passworts = {
|
||||
enable = lib.mkEnableOption "Passwords Server";
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 5010;
|
||||
example = 8080;
|
||||
description = "Internal port for webui";
|
||||
|
|
|
@ -10,50 +10,50 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.prometheus = with lib; {
|
||||
enable = mkEnableOption "Prometheus for monitoring";
|
||||
options.my.services.prometheus = {
|
||||
enable = lib.mkEnableOption "Prometheus for monitoring";
|
||||
|
||||
scrapeInterval = mkOption {
|
||||
type = types.str;
|
||||
scrapeInterval = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "15s";
|
||||
example = "1m";
|
||||
description = "Scrape interval";
|
||||
};
|
||||
|
||||
retentionTime = mkOption {
|
||||
type = types.str;
|
||||
retentionTime = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "2y";
|
||||
example = "1m";
|
||||
description = "retention time";
|
||||
};
|
||||
|
||||
# a good collections for alerts can be found here: https://samber.github.io/awesome-prometheus-alerts/rules#blackbox
|
||||
rules = mkOption {
|
||||
type = types.attrsOf (
|
||||
types.submodule {
|
||||
rules = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
condition = mkOption {
|
||||
type = types.str;
|
||||
condition = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Prometheus alert expression.
|
||||
'';
|
||||
example = ''disk_used_percent{mode!="ro"} >= 90'';
|
||||
example = "up == 0";
|
||||
default = null;
|
||||
};
|
||||
description = mkOption {
|
||||
type = types.str;
|
||||
description = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Prometheus alert message.
|
||||
'';
|
||||
example = "Prometheus encountered value {{ $value }} with {{ $labels }}";
|
||||
default = null;
|
||||
};
|
||||
labels = mkOption {
|
||||
type = types.nullOr (types.attrsOf types.str);
|
||||
labels = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.attrsOf lib.types.str);
|
||||
description = ''
|
||||
Additional alert labels.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
example = lib.literalExpression ''
|
||||
{ severity = "page" };
|
||||
'';
|
||||
default = { };
|
||||
|
|
|
@ -5,11 +5,11 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.promtail = with lib; {
|
||||
enable = mkEnableOption "promtail log forwarding";
|
||||
options.my.services.promtail = {
|
||||
enable = lib.mkEnableOption "promtail log forwarding";
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 9081;
|
||||
example = 3002;
|
||||
description = "Internal port";
|
||||
|
|
|
@ -7,8 +7,8 @@ let
|
|||
port = 9696;
|
||||
in
|
||||
{
|
||||
options.my.services.prowlarr = with lib; {
|
||||
enable = mkEnableOption "Prowlarr for indexing";
|
||||
options.my.services.prowlarr = {
|
||||
enable = lib.mkEnableOption "Prowlarr for indexing";
|
||||
|
||||
apiKeyFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
|
|
|
@ -7,8 +7,8 @@ let
|
|||
port = 7878;
|
||||
in
|
||||
{
|
||||
options.my.services.radarr = with lib; {
|
||||
enable = mkEnableOption "Radarr for film management";
|
||||
options.my.services.radarr = {
|
||||
enable = lib.mkEnableOption "Radarr for film management";
|
||||
|
||||
apiKeyFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
|
|
|
@ -7,8 +7,8 @@ let
|
|||
port = 8989;
|
||||
in
|
||||
{
|
||||
options.my.services.sonarr = with lib; {
|
||||
enable = mkEnableOption "Sonarr for series management";
|
||||
options.my.services.sonarr = {
|
||||
enable = lib.mkEnableOption "Sonarr for series management";
|
||||
|
||||
apiKeyFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
|
|
|
@ -5,8 +5,8 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.tandoor-recipes = with lib; {
|
||||
enable = mkEnableOption "Tandoor Recipes";
|
||||
options.my.services.tandoor-recipes = {
|
||||
enable = lib.mkEnableOption "Tandoor Recipes";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -5,11 +5,11 @@ let
|
|||
inherit (config.networking) domain;
|
||||
in
|
||||
{
|
||||
options.my.services.vpn = with lib; {
|
||||
enable = mkEnableOption "Headscale VPN";
|
||||
isMaster = mkEnableOption "Headscale Master";
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
options.my.services.vpn = {
|
||||
enable = lib.mkEnableOption "Headscale VPN";
|
||||
isMaster = lib.mkEnableOption "Headscale Master";
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 8090;
|
||||
example = 8080;
|
||||
description = "Internal port";
|
||||
|
|
|
@ -9,8 +9,8 @@ let
|
|||
cfg = config.my.system.avahi;
|
||||
in
|
||||
{
|
||||
options.my.system.avahi = with lib; {
|
||||
enable = mkEnableOption "avahi configuration";
|
||||
options.my.system.avahi = {
|
||||
enable = lib.mkEnableOption "avahi configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -10,8 +10,8 @@ let
|
|||
cfg = config.my.system.docker;
|
||||
in
|
||||
{
|
||||
options.my.system.docker = with lib; {
|
||||
enable = mkEnableOption "docker configuration";
|
||||
options.my.system.docker = {
|
||||
enable = lib.mkEnableOption "docker configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -8,11 +8,11 @@ let
|
|||
cfg = config.my.system.fonts;
|
||||
in
|
||||
{
|
||||
options.my.system.fonts = with lib; {
|
||||
enable = mkEnableOption "fonts configuration";
|
||||
options.my.system.fonts = {
|
||||
enable = lib.mkEnableOption "fonts configuration";
|
||||
|
||||
additionalFonts = mkOption {
|
||||
type = types.listOf types.package;
|
||||
additionalFonts = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
default = [ ];
|
||||
example = "fira";
|
||||
description = "Which additional fonts should be added as well";
|
||||
|
|
|
@ -3,16 +3,16 @@ let
|
|||
cfg = config.my.system.kvm;
|
||||
in
|
||||
{
|
||||
options.my.system.kvm = with lib; {
|
||||
enable = mkEnableOption "kvm configuration";
|
||||
options.my.system.kvm = {
|
||||
enable = lib.mkEnableOption "kvm configuration";
|
||||
|
||||
cpuFlavor = mkOption {
|
||||
type =
|
||||
with types;
|
||||
nullOr (enum [
|
||||
cpuFlavor = lib.mkOption {
|
||||
type = lib.types.nullOr (
|
||||
lib.types.enum [
|
||||
"intel"
|
||||
"amd"
|
||||
]);
|
||||
]
|
||||
);
|
||||
default = null;
|
||||
example = "intel";
|
||||
description = "Which kind of CPU to activate kernelModules";
|
||||
|
|
|
@ -10,8 +10,8 @@ let
|
|||
cfg = config.my.system.miracast;
|
||||
in
|
||||
{
|
||||
options.my.system.miracast = with lib; {
|
||||
enable = mkEnableOption "miracast configuration";
|
||||
options.my.system.miracast = {
|
||||
enable = lib.mkEnableOption "miracast configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -10,8 +10,8 @@ let
|
|||
cfg = config.my.system.podman;
|
||||
in
|
||||
{
|
||||
options.my.system.podman = with lib; {
|
||||
enable = mkEnableOption "podman configuration";
|
||||
options.my.system.podman = {
|
||||
enable = lib.mkEnableOption "podman configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -10,8 +10,8 @@ let
|
|||
cfg = config.my.system.spell-check;
|
||||
in
|
||||
{
|
||||
options.my.system.spell-check = with lib; {
|
||||
enable = mkEnableOption "spell-check configuration";
|
||||
options.my.system.spell-check = {
|
||||
enable = lib.mkEnableOption "spell-check configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -8,8 +8,8 @@ let
|
|||
cfg = config.my.profiles."3d-design";
|
||||
in
|
||||
{
|
||||
options.my.profiles."3d-design" = with lib; {
|
||||
enable = mkEnableOption "3d-design profile";
|
||||
options.my.profiles."3d-design" = {
|
||||
enable = lib.mkEnableOption "3d-design profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -8,8 +8,8 @@ let
|
|||
cfg = config.my.profiles.android;
|
||||
in
|
||||
{
|
||||
options.my.profiles.android = with lib; {
|
||||
enable = mkEnableOption "android profile";
|
||||
options.my.profiles.android = {
|
||||
enable = lib.mkEnableOption "android profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -8,8 +8,8 @@ let
|
|||
cfg = config.my.profiles.clean;
|
||||
in
|
||||
{
|
||||
options.my.profiles.clean = with lib; {
|
||||
enable = mkEnableOption "clean profile";
|
||||
options.my.profiles.clean = {
|
||||
enable = lib.mkEnableOption "clean profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -8,8 +8,8 @@ let
|
|||
cfg = config.my.profiles.desktop-apps;
|
||||
in
|
||||
{
|
||||
options.my.profiles.desktop-apps = with lib; {
|
||||
enable = mkEnableOption "desktop-apps profile";
|
||||
options.my.profiles.desktop-apps = {
|
||||
enable = lib.mkEnableOption "desktop-apps profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -8,8 +8,8 @@ let
|
|||
cfg = config.my.profiles.desktop-dev;
|
||||
in
|
||||
{
|
||||
options.my.profiles.desktop-dev = with lib; {
|
||||
enable = mkEnableOption "desktop-dev profile";
|
||||
options.my.profiles.desktop-dev = {
|
||||
enable = lib.mkEnableOption "desktop-dev profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -8,8 +8,8 @@ let
|
|||
cfg = config.my.profiles.development;
|
||||
in
|
||||
{
|
||||
options.my.profiles.development = with lib; {
|
||||
enable = mkEnableOption "development profile";
|
||||
options.my.profiles.development = {
|
||||
enable = lib.mkEnableOption "development profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue