diff --git a/flake.lock b/flake.lock index 40a3065..eed87a9 100644 --- a/flake.lock +++ b/flake.lock @@ -64,6 +64,26 @@ "type": "github" } }, + "fieldseeker-sync": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1759858818, + "narHash": "sha256-UOcAlg4lWVB6c4ROZDO2JICf3ZsmEqIpylUGS1VgQTs=", + "owner": "Gleipnir-Technology", + "repo": "fieldseeker-sync", + "rev": "71ffd1ef99510feb7a3a0cda69a8130f4eafa733", + "type": "github" + }, + "original": { + "owner": "Gleipnir-Technology", + "repo": "fieldseeker-sync", + "rev": "71ffd1ef99510feb7a3a0cda69a8130f4eafa733", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -158,6 +178,24 @@ "type": "github" } }, + "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -265,6 +303,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1759735786, + "narHash": "sha256-a0+h02lyP2KwSNrZz4wLJTu9ikujNsTWIC874Bv7IJ0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "20c4598c84a671783f741e02bf05cbfaf4907cff", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1752436162, "narHash": "sha256-Kt1UIPi7kZqkSc5HVj6UY5YLHHEzPBkgpNUByuyxtlw=", @@ -280,7 +334,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1744868846, "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", @@ -296,7 +350,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1758763312, "narHash": "sha256-puBMviZhYlqOdUUgEmMVJpXqC/ToEqSvkyZ30qQ09xM=", @@ -317,7 +371,7 @@ "nixpkgs" ], "nuschtosSearch": "nuschtosSearch", - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1752010420, @@ -336,7 +390,7 @@ }, "nuschtosSearch": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "ixx": "ixx", "nixpkgs": [ "nixvim", @@ -432,8 +486,9 @@ "inputs": { "authentik-nix": "authentik-nix", "disko": "disko", + "fieldseeker-sync": "fieldseeker-sync", "home-manager": "home-manager", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixvim": "nixvim", "sops-nix": "sops-nix", "timecard-bot": "timecard-bot" @@ -441,7 +496,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1752544651, @@ -502,9 +557,24 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "timecard-bot": { "inputs": { - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "pyproject-nix": "pyproject-nix_2" }, "locked": { diff --git a/flake.nix b/flake.nix index 67837bf..6a714a8 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,12 @@ inputs.nixpkgs.follows = "nixpkgs"; url = "github:nix-community/disko"; }; + fieldseeker-sync = { + type = "github"; + owner = "Gleipnir-Technology"; + repo = "fieldseeker-sync"; + rev = "71ffd1ef99510feb7a3a0cda69a8130f4eafa733"; + }; home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/system/fieldseeker-sync.nix b/modules/system/fieldseeker-sync.nix index f94b4ac..9dcdf40 100644 --- a/modules/system/fieldseeker-sync.nix +++ b/modules/system/fieldseeker-sync.nix @@ -1,20 +1,14 @@ -{ pkgs, lib, config, ... }: +{ config, inputs, lib, pkgs, ... }: with lib; let - src = pkgs.callPackage (pkgs.fetchFromGitHub { - owner = "Gleipnir-Technology"; - repo = "fieldseeker-sync"; - rev = rev; - sha256 = "sha256-Y8B/HcBzne5sn3/W3p444VT5nx5ltXqoPMX9PPnJ5M8="; - }) { }; - rev = "0.0.25"; + fieldseeker-sync-pkg = inputs.fieldseeker-sync.packages.x86_64-linux.default; in { options.myModules.fieldseeker-sync.enable = mkEnableOption "custom fieldseeker-sync configuration"; config = mkIf config.myModules.fieldseeker-sync.enable { environment.systemPackages = [ + fieldseeker-sync-pkg pkgs.ffmpeg - src ]; services.caddy.virtualHosts."deltamvcd.nidus.cloud".extraConfig = '' reverse_proxy http://127.0.0.1:3000 @@ -110,7 +104,7 @@ in { Type = "simple"; User = "fieldseeker-sync"; Group = "fieldseeker-sync"; - ExecStart = "${src}/bin/audio-post-processor"; + ExecStart = "${fieldseeker-sync-pkg}/bin/audio-post-processor"; TimeoutStopSec = "5s"; PrivateTmp = true; WorkingDirectory = "/tmp"; @@ -129,7 +123,7 @@ in { Type = "simple"; User = "fieldseeker-sync"; Group = "fieldseeker-sync"; - ExecStart = "${src}/bin/audio-post-processor"; + ExecStart = "${fieldseeker-sync-pkg}/bin/audio-post-processor"; TimeoutStopSec = "5s"; PrivateTmp = true; WorkingDirectory = "/tmp"; @@ -145,7 +139,7 @@ in { stopIfChanged = false; serviceConfig = { EnvironmentFile="/var/run/secrets/fieldseeker-sync-env"; - ExecStart = "${src}/bin/full-export"; + ExecStart = "${fieldseeker-sync-pkg}/bin/full-export"; Group = "fieldseeker-sync"; PrivateTmp = true; TimeoutStopSec = "5s"; @@ -164,7 +158,7 @@ in { stopIfChanged = false; serviceConfig = { EnvironmentFile="/var/run/secrets/fieldseeker-sync-gleipnir-env"; - ExecStart = "${src}/bin/full-export"; + ExecStart = "${fieldseeker-sync-pkg}/bin/full-export"; Group = "fieldseeker-sync"; PrivateTmp = true; TimeoutStopSec = "5s"; @@ -180,12 +174,12 @@ in { description="FieldSeeker DB migrate"; requires=["network-online.target"]; serviceConfig = { - Environment="SENTRY_RELEASE=${rev}"; + Environment="SENTRY_RELEASE=${inputs.fieldseeker-sync.rev}"; EnvironmentFile="/var/run/secrets/fieldseeker-sync-env"; Type = "oneshot"; User = "fieldseeker-sync"; Group = "fieldseeker-sync"; - ExecStart = "${src}/bin/migrate"; + ExecStart = "${fieldseeker-sync-pkg}/bin/migrate"; TimeoutStopSec = "5s"; PrivateTmp = true; WorkingDirectory = "/tmp"; @@ -197,12 +191,12 @@ in { description="FieldSeeker Gleipnir DB migrate"; requires=["network-online.target"]; serviceConfig = { - Environment="SENTRY_RELEASE=${rev}"; + Environment="SENTRY_RELEASE=${inputs.fieldseeker-sync.rev}"; EnvironmentFile="/var/run/secrets/fieldseeker-sync-gleipnir-env"; Type = "oneshot"; User = "fieldseeker-sync"; Group = "fieldseeker-sync"; - ExecStart = "${src}/bin/migrate"; + ExecStart = "${fieldseeker-sync-pkg}/bin/migrate"; TimeoutStopSec = "5s"; PrivateTmp = true; WorkingDirectory = "/tmp"; @@ -214,12 +208,12 @@ in { description="FieldSeeker sync"; requires=["network-online.target"]; serviceConfig = { - Environment="SENTRY_RELEASE=${rev}"; + Environment="SENTRY_RELEASE=${inputs.fieldseeker-sync.rev}"; EnvironmentFile="/var/run/secrets/fieldseeker-sync-env"; Type = "simple"; User = "fieldseeker-sync"; Group = "fieldseeker-sync"; - ExecStart = "${src}/bin/webserver"; + ExecStart = "${fieldseeker-sync-pkg}/bin/webserver"; TimeoutStopSec = "5s"; PrivateTmp = true; WorkingDirectory = "/tmp"; @@ -231,12 +225,12 @@ in { description="FieldSeeker sync"; requires=["network-online.target"]; serviceConfig = { - Environment="SENTRY_RELEASE=${rev}"; + Environment="SENTRY_RELEASE=${inputs.fieldseeker-sync.rev}"; EnvironmentFile="/var/run/secrets/fieldseeker-sync-gleipnir-env"; Type = "simple"; User = "fieldseeker-sync"; Group = "fieldseeker-sync"; - ExecStart = "${src}/bin/webserver"; + ExecStart = "${fieldseeker-sync-pkg}/bin/webserver"; TimeoutStopSec = "5s"; PrivateTmp = true; WorkingDirectory = "/tmp";