Move asterisk-sounds-de to overlay

This commit is contained in:
Jakob Lechner 2025-05-26 16:36:06 +02:00
parent bfa03c0c67
commit 8288820ffc
6 changed files with 55 additions and 39 deletions

43
flake.lock generated
View file

@ -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",

View file

@ -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

View file

@ -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
'';
}

View file

@ -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"
'')
];
};
}

View file

@ -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;
};

View file

@ -1,6 +1,5 @@
{
imports = [
./asterisk-sounds-de/module.nix
./ksoloti/module.nix
./myintercom-doorbell/module.nix
];