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