Updated mosquitto and formatted files
This commit is contained in:
parent
846e8dbafc
commit
ce8a5a76f5
15 changed files with 116 additions and 145 deletions
|
@ -17,11 +17,8 @@
|
|||
nix = {
|
||||
package = pkgs.nixUnstable;
|
||||
autoOptimiseStore = true;
|
||||
binaryCaches = [
|
||||
"https://cachix.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://nixpkgs-review-bot.cachix.org"
|
||||
];
|
||||
binaryCaches =
|
||||
[ "https://cachix.cachix.org" "https://nix-community.cachix.org" "https://nixpkgs-review-bot.cachix.org" ];
|
||||
binaryCachePublicKeys = [
|
||||
"cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
|
|
|
@ -2,11 +2,7 @@
|
|||
# See also: https://blog.xirion.net/posts/nixos-proxmox-lxc/
|
||||
|
||||
# Supress systemd services that don't work (correctly) on LXC
|
||||
systemd.suppressedSystemUnits = [
|
||||
"dev-mqueue.mount"
|
||||
"sys-kernel-debug.mount"
|
||||
"sys-fs-fuse-connections.mount"
|
||||
];
|
||||
systemd.suppressedSystemUnits = [ "dev-mqueue.mount" "sys-kernel-debug.mount" "sys-fs-fuse-connections.mount" ];
|
||||
|
||||
# Enable SSH daemon support.
|
||||
services.openssh.enable = true;
|
||||
|
|
|
@ -1,8 +1 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./flood.nix
|
||||
./unpackerr.nix
|
||||
./vmagent.nix
|
||||
];
|
||||
}
|
||||
{ config, lib, pkgs, ... }: { imports = [ ./flood.nix ./unpackerr.nix ./vmagent.nix ]; }
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.services.flood;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.services.flood = {
|
||||
enable = mkEnableOption "flood";
|
||||
|
||||
|
@ -111,9 +110,7 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
# Create group if set to default
|
||||
users.groups = mkIf (cfg.group == "rtorrent") {
|
||||
rtorrent = { };
|
||||
};
|
||||
users.groups = mkIf (cfg.group == "rtorrent") { rtorrent = { }; };
|
||||
|
||||
# Create user if set to default
|
||||
users.users = mkIf (cfg.user == "flood") {
|
||||
|
@ -140,7 +137,12 @@ in
|
|||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
WorkingDirectory = cfg.dataDir;
|
||||
ExecStart = "${cfg.package}/bin/flood --baseuri ${cfg.baseURI} --rundir ${cfg.dataDir} --host ${cfg.host} --port ${toString cfg.port} ${if cfg.ssl then "--ssl" else ""} --auth ${cfg.authMode} --rtsocket ${cfg.rpcSocket} --allowedpath ${cfg.downloadDir}";
|
||||
ExecStart =
|
||||
"${cfg.package}/bin/flood --baseuri ${cfg.baseURI} --rundir ${cfg.dataDir} --host ${cfg.host} --port ${
|
||||
toString cfg.port
|
||||
} ${
|
||||
if cfg.ssl then "--ssl" else ""
|
||||
} --auth ${cfg.authMode} --rtsocket ${cfg.rpcSocket} --allowedpath ${cfg.downloadDir}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -57,8 +57,7 @@ let
|
|||
'';
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.services.unpackerr = {
|
||||
enable = mkEnableOption "unpackerr";
|
||||
|
||||
|
@ -151,13 +150,25 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
sonarr = mkStarrOptions { name = "Sonarr"; url = "http://localhost:8989"; };
|
||||
sonarr = mkStarrOptions {
|
||||
name = "Sonarr";
|
||||
url = "http://localhost:8989";
|
||||
};
|
||||
|
||||
radarr = mkStarrOptions { name = "Radarr"; url = "http://localhost:7878"; };
|
||||
radarr = mkStarrOptions {
|
||||
name = "Radarr";
|
||||
url = "http://localhost:7878";
|
||||
};
|
||||
|
||||
lidarr = mkStarrOptions { name = "Lidarr"; url = "http://localhost:8686"; };
|
||||
lidarr = mkStarrOptions {
|
||||
name = "Lidarr";
|
||||
url = "http://localhost:8686";
|
||||
};
|
||||
|
||||
readarr = mkStarrOptions { name = "Readarr"; url = "http://localhost:8787"; };
|
||||
readarr = mkStarrOptions {
|
||||
name = "Readarr";
|
||||
url = "http://localhost:8787";
|
||||
};
|
||||
|
||||
folder = {
|
||||
path = mkOption {
|
||||
|
@ -207,21 +218,17 @@ in
|
|||
|
||||
extraConfig = mkOption {
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
default = { };
|
||||
description = ''
|
||||
Extra environment variables
|
||||
'';
|
||||
example = {
|
||||
UN_WEBHOOK_0_URL = "http://example.com";
|
||||
};
|
||||
example = { UN_WEBHOOK_0_URL = "http://example.com"; };
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Create group if set to default
|
||||
users.groups = mkIf (cfg.group == "unpackerr") {
|
||||
unpackerr = { };
|
||||
};
|
||||
users.groups = mkIf (cfg.group == "unpackerr") { unpackerr = { }; };
|
||||
|
||||
# Create user if set to default
|
||||
users.users = mkIf (cfg.user == "unpackerr") {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.services.vmagent;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.services.vmagent = {
|
||||
enable = mkEnableOption "vmagent";
|
||||
|
||||
|
@ -74,9 +73,7 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
# Create group if set to default
|
||||
users.groups = mkIf (cfg.group == "vmagent") {
|
||||
vmagent = { };
|
||||
};
|
||||
users.groups = mkIf (cfg.group == "vmagent") { vmagent = { }; };
|
||||
|
||||
# Create user if set to default
|
||||
users.users = mkIf (cfg.user == "vmagent") {
|
||||
|
@ -93,8 +90,7 @@ in
|
|||
networking.firewall.allowedTCPPorts = mkIf (cfg.openFirewall) [ 8429 ];
|
||||
|
||||
# The actual service
|
||||
systemd.services.vmagent = let
|
||||
prometheusConfig = pkgs.writeText "prometheus.yml" cfg.prometheusConfig;
|
||||
systemd.services.vmagent = let prometheusConfig = pkgs.writeText "prometheus.yml" cfg.prometheusConfig;
|
||||
in {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
@ -105,7 +101,8 @@ in
|
|||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
WorkingDirectory = cfg.dataDir;
|
||||
ExecStart = "${cfg.package}/bin/vmagent -remoteWrite.url=${cfg.remoteWriteUrl} -promscrape.config=${prometheusConfig}";
|
||||
ExecStart =
|
||||
"${cfg.package}/bin/vmagent -remoteWrite.url=${cfg.remoteWriteUrl} -promscrape.config=${prometheusConfig}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -55,13 +55,5 @@
|
|||
};
|
||||
|
||||
# Setup packages available everywhere
|
||||
environment.systemPackages = with pkgs; [
|
||||
fzf
|
||||
git
|
||||
htop
|
||||
rsync
|
||||
ripgrep
|
||||
vim
|
||||
zoxide
|
||||
];
|
||||
environment.systemPackages = with pkgs; [ fzf git htop rsync ripgrep vim zoxide ];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue