diff --git a/flake.lock b/flake.lock index cb635b3..7ac1204 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,31 @@ { "nodes": { + "asterisk-sounds-de": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nix-filter": [ + "nix-filter" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1748284610, + "narHash": "sha256-B3/OOZC0puXbODupPEbdMA6sJP39MzbMCl4j1HvgNfU=", + "ref": "refs/heads/main", + "rev": "6b1c484318727af78a64aee3f46903493dae8259", + "revCount": 1, + "type": "git", + "url": "https://git.jalr.de/jalr/asterisk-sounds-de" + }, + "original": { + "type": "git", + "url": "https://git.jalr.de/jalr/asterisk-sounds-de" + } + }, "crane": { "locked": { "lastModified": 1731098351, @@ -278,6 +304,21 @@ "type": "github" } }, + "nix-filter": { + "locked": { + "lastModified": 1731533336, + "narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "f7653272fd234696ae94229839a99b73c9ab7de0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "nix-filter", + "type": "github" + } + }, "nix-github-actions": { "inputs": { "nixpkgs": [ @@ -477,6 +518,7 @@ }, "root": { "inputs": { + "asterisk-sounds-de": "asterisk-sounds-de", "disko": "disko", "flake-utils": "flake-utils", "gomod2nix": "gomod2nix", @@ -484,6 +526,7 @@ "impermanence": "impermanence", "krops": "krops", "lanzaboote": "lanzaboote", + "nix-filter": "nix-filter", "nix-pre-commit-hooks": "nix-pre-commit-hooks", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 606db08..3d0937c 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,8 @@ flake-utils.url = "github:numtide/flake-utils"; + nix-filter.url = "github:numtide/nix-filter"; + gomod2nix = { url = "github:nix-community/gomod2nix"; inputs.flake-utils.follows = "flake-utils"; @@ -52,6 +54,15 @@ url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + + asterisk-sounds-de = { + url = "git+https://git.jalr.de/jalr/asterisk-sounds-de"; + inputs = { + flake-utils.follows = "flake-utils"; + nix-filter.follows = "nix-filter"; + nixpkgs.follows = "nixpkgs"; + }; + }; }; outputs = { self @@ -193,6 +204,7 @@ ] ++ [ { nixpkgs.overlays = [ nur.overlays.default ]; } home-manager.nixosModules.home-manager + inputs.asterisk-sounds-de.nixosModules.default inputs.disko.nixosModules.disko inputs.impermanence.nixosModules.impermanence inputs.lanzaboote.nixosModules.lanzaboote diff --git a/pkgs/asterisk-sounds-de/default.nix b/pkgs/asterisk-sounds-de/default.nix deleted file mode 100644 index ca5cad5..0000000 --- a/pkgs/asterisk-sounds-de/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ stdenvNoCC -, fetchurl -, unzip -}: - -stdenvNoCC.mkDerivation rec { - src = fetchurl { - url = "https://www.asterisksounds.org/sites/asterisksounds.org/files/sounds/de/download/asterisk-sounds-core-de-${version}.zip"; - sha256 = "y97xVDBHgnD/Z/DxjKcSNjCXXfiVO+PWUFMbyQpaFLY="; - }; - name = "asterisk-sounds-de"; - version = "2.11.19"; - dontBuild = true; - nativeBuildInputs = [ unzip ]; - unpackPhase = '' - unzip $src - ''; - installPhase = '' - mkdir $out - cp -r * $out - ''; -} diff --git a/pkgs/asterisk-sounds-de/module.nix b/pkgs/asterisk-sounds-de/module.nix deleted file mode 100644 index 0bfbeda..0000000 --- a/pkgs/asterisk-sounds-de/module.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, pkgs, ... }: - -let cfg = config; -in -{ - config = lib.mkIf cfg.services.asterisk.enable { - systemd.services.asterisk.preStart = lib.mkMerge [ - (lib.mkAfter '' - sounds_de="/var/lib/asterisk/sounds/de" - [ -L "$sounds_de" ] && rm "$sounds_de" - ln -s "${pkgs.asterisk-sounds-de}/" "$sounds_de" - '') - ]; - }; -} diff --git a/pkgs/default.nix b/pkgs/default.nix index 5a27c44..7222cf4 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -6,7 +6,6 @@ let poetry2nix = callPackage inputs.poetry2nix { }; in { - asterisk-sounds-de = callPackage ./asterisk-sounds-de { }; ksoloti = callPackage ./ksoloti { gcc-arm-embedded = pkgsCross.arm-embedded.buildPackages.gcc; }; diff --git a/pkgs/modules.nix b/pkgs/modules.nix index 067cbc4..195958b 100644 --- a/pkgs/modules.nix +++ b/pkgs/modules.nix @@ -1,6 +1,5 @@ { imports = [ - ./asterisk-sounds-de/module.nix ./ksoloti/module.nix ./myintercom-doorbell/module.nix ];