all: format .nix filex with nixfmt-rfc

This commit is contained in:
2025-01-10 18:11:42 +01:00
parent e571ae07c0
commit 77e24e385a
22 changed files with 863 additions and 547 deletions

View File

@@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
# Enable Nginx
services.nginx = {
enable = true;
@@ -61,7 +62,7 @@
enable = true;
# Ensure the database, user, and permissions always exist
ensureDatabases = ["nextcloud"];
ensureDatabases = [ "nextcloud" ];
ensureUsers = [
{
name = "nextcloud";
@@ -72,7 +73,7 @@
# Ensure that postgres is running before running the setup
systemd.services."nextcloud-setup" = {
requires = ["postgresql.service"];
after = ["postgresql.service"];
requires = [ "postgresql.service" ];
after = [ "postgresql.service" ];
};
}

View File

@@ -4,11 +4,13 @@
pkgs,
...
}:
with lib; let
with lib;
let
cfg = config.services.qbittorrent;
configDir = "${cfg.dataDir}/.config";
openFilesLimit = 4096;
in {
in
{
options.services.qbittorrent = {
enable = mkOption {
type = types.bool;
@@ -67,24 +69,24 @@ in {
};
config = mkIf cfg.enable {
environment.systemPackages = [pkgs.qbittorrent];
environment.systemPackages = [ pkgs.qbittorrent ];
nixpkgs.overlays = [
(final: prev: {
qbittorrent = prev.qbittorrent.override {guiSupport = false;};
qbittorrent = prev.qbittorrent.override { guiSupport = false; };
})
];
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [cfg.port];
allowedUDPPorts = [cfg.port];
allowedTCPPorts = [ cfg.port ];
allowedUDPPorts = [ cfg.port ];
};
systemd.services.qbittorrent = {
after = ["network.target"];
after = [ "network.target" ];
description = "qBittorrent Daemon";
wantedBy = ["multi-user.target"];
path = [pkgs.qbittorrent];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.qbittorrent ];
serviceConfig = {
ExecStart = ''
${pkgs.qbittorrent}/bin/qbittorrent-nox \
@@ -110,7 +112,10 @@ in {
};
};
users.groups =
mkIf (cfg.group == "qbittorrent") {qbittorrent = {gid = null;};};
users.groups = mkIf (cfg.group == "qbittorrent") {
qbittorrent = {
gid = null;
};
};
};
}