diff --git a/.gitattributes b/.gitattributes index 4c9ff84..021d814 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,4 @@ secrets/murmur_password filter=git-crypt diff=git-crypt secrets/hashedPass filter=git-crypt diff=git-crypt secrets/mullvad.nix filter=git-crypt diff=git-crypt secrets/minecraft-whitelist.nix filter=git-crypt diff=git-crypt +secrets/Jellyfin.Plugin.ListenBrainz.xml filter=git-crypt diff=git-crypt diff --git a/configuration.nix b/configuration.nix index 2dc3981..9ea7519 100644 --- a/configuration.nix +++ b/configuration.nix @@ -62,6 +62,11 @@ compressor = "zstd"; compressorArgs = [ "-19" ]; }; + kernelModules = [ + # kernel module for case fan control + "nct6775" + ]; + }; environment.etc = { @@ -123,7 +128,7 @@ (pkgs.writeScriptBin "mc-attach" '' #!/bin/sh - tmux -S /run/minecraft/${service_configs.minecraft.server_name}.sock attach + ${pkgs.tmux}/bin/tmux -S /run/minecraft/${service_configs.minecraft.server_name}.sock attach '') (pkgs.writeScriptBin "disk-smart-test" '' @@ -178,6 +183,21 @@ services.udev.packages = [ pkgs.openrgb-with-all-plugins ]; hardware.i2c.enable = true; + hardware.fancontrol = { + enable = true; + config = '' + INTERVAL=10 + DEVPATH=hwmon0=devices/pci0000:00/0000:00:18.3 hwmon1=devices/platform/nct6775.656 + DEVNAME=hwmon0=zenpower hwmon1=nct6798 + FCTEMPS=hwmon1/pwm4=hwmon0/temp1_input hwmon1/pwm2=hwmon0/temp1_input + FCFANS=hwmon1/pwm4=hwmon1/fan4_input hwmon1/pwm2=hwmon1/fan2_input + MINTEMP=hwmon1/pwm4=20 hwmon1/pwm2=20 + MAXTEMP=hwmon1/pwm4=70 hwmon1/pwm2=70 + MINSTART=hwmon1/pwm4=150 hwmon1/pwm2=150 + MINSTOP=hwmon1/pwm4=100 hwmon1/pwm2=100 + ''; + }; + networking = { nameservers = [ "1.1.1.1" diff --git a/flake.lock b/flake.lock index 5bdf9ae..673af12 100644 --- a/flake.lock +++ b/flake.lock @@ -43,11 +43,11 @@ ] }, "locked": { - "lastModified": 1727747697, - "narHash": "sha256-bNZ4ykMpxyTLrPsctiDwe5d69vafvIbNTbzbWfd2CH4=", + "lastModified": 1728006367, + "narHash": "sha256-Bdf5twzinaacnn1JBogvxq0S8Ytm+25mWD2cfJ7fvpo=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "30af58cedcc444da772a73286e16287f94a9fef1", + "rev": "a3a7888df1b87bdababfd9f0b00b574ee4c2e204", "type": "github" }, "original": { diff --git a/secrets/Jellyfin.Plugin.ListenBrainz.xml b/secrets/Jellyfin.Plugin.ListenBrainz.xml new file mode 100644 index 0000000..f5a3780 Binary files /dev/null and b/secrets/Jellyfin.Plugin.ListenBrainz.xml differ diff --git a/services/jellyfin.nix b/services/jellyfin.nix index c602ce7..b1b6072 100644 --- a/services/jellyfin.nix +++ b/services/jellyfin.nix @@ -2,6 +2,7 @@ pkgs, config, service_configs, + lib, ... }: { @@ -26,4 +27,10 @@ "video" "render" ]; + + # https://github.com/lyarenei/jellyfin-plugin-listenbrainz/issues/107 + system.activationScripts.jellyfinListenBrain.text = '' + cp -v /etc/nixos/secrets/Jellyfin.Plugin.ListenBrainz.xml ${service_configs.jellyfin.data_dir}/plugins/configurations/ + chown ${config.services.jellyfin.user}:${config.services.jellyfin.group} ${service_configs.jellyfin.data_dir}/plugins/configurations/Jellyfin.Plugin.ListenBrainz.xml + ''; }