This commit is contained in:
2025-02-01 21:32:26 -05:00
parent b98adc50f6
commit a22012df2c
18 changed files with 102 additions and 79 deletions

View File

@@ -12,6 +12,7 @@
imports = [
./hardware.nix
./zfs.nix
./services/postgresql.nix
./services/jellyfin.nix
./services/caddy.nix
./services/immich.nix
@@ -20,9 +21,7 @@
./services/wg.nix
./services/qbittorrent.nix
./services/bitmagnet.nix
./services/matrix.nix
./services/owntracks.nix
];
@@ -209,21 +208,32 @@
systemd.services.no-rgb =
let
no-rgb = pkgs.writeScriptBin "no-rgb" ''
#!/bin/sh
set -e
no-rgb = (
pkgs.writeShellApplication {
name = "no-rgb";
runtimeInputs = with pkgs; [
openrgb
coreutils
gnugrep
];
NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | ${pkgs.gnugrep}/bin/grep -E '^[0-9]+: ' | ${pkgs.coreutils}/bin/wc -l)
text = ''
#!/bin/sh
set -e
for i in $(${pkgs.coreutils}/bin/seq 0 $(($NUM_DEVICES - 1))); do
${pkgs.openrgb}/bin/openrgb --noautoconnect --device $i --mode direct --color 000000
done
'';
NUM_DEVICES=$(openrgb --noautoconnect --list-devices | grep -cE '^[0-9]+: ')
for i in $(seq 0 $((NUM_DEVICES - 1))); do
openrgb --noautoconnect --device "$i" --mode direct --color 000000
done
'';
}
);
in
{
description = "disable rgb";
serviceConfig = {
ExecStart = "${no-rgb}/bin/no-rgb";
ExecStart = "${no-rgb}/bin/${no-rgb.name}";
Type = "oneshot";
};
wantedBy = [ "multi-user.target" ];
@@ -283,8 +293,6 @@
"wheel"
"video"
"render"
"postgres"
"media"
service_configs.torrent_group
];
@@ -338,15 +346,5 @@
# };
# };
services.postgresql = {
enable = true;
package = pkgs.postgresql_16;
dataDir = "/tank/services/sql";
};
systemd.tmpfiles.rules = [
"d ${config.services.postgresql.dataDir} 0700 postgres postgres"
];
system.stateVersion = "24.11";
}