Compare commits
2 commits
2ff5b5e057
...
289bb07cc2
| Author | SHA1 | Date | |
|---|---|---|---|
| 289bb07cc2 | |||
| 5251774f9d |
4 changed files with 53 additions and 18 deletions
32
common/audio-sharing.nix
Normal file
32
common/audio-sharing.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.schmittlauch.audio-sharing;
|
||||||
|
fwPort = 8554;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.schmittlauch.audio-sharing = {
|
||||||
|
enable = lib.mkEnableOption "enable Gnome audio-sharing application via rtsp";
|
||||||
|
openFirewall = lib.mkOption {
|
||||||
|
default = true;
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Opens the port ${toString fwPort} to allow access to the rtsp stream";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkMerge [
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [ pkgs.audio-sharing ];
|
||||||
|
})
|
||||||
|
(lib.mkIf (cfg.enable && cfg.openFirewall) {
|
||||||
|
networking.firewall = {
|
||||||
|
allowedUDPPorts = [ fwPort ];
|
||||||
|
allowedTCPPorts = [ fwPort ];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ in
|
||||||
./nix-settings.nix
|
./nix-settings.nix
|
||||||
./upgrade-diff.nix
|
./upgrade-diff.nix
|
||||||
./guest.nix
|
./guest.nix
|
||||||
|
./audio-sharing.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
services.davfs2.enable = true;
|
services.davfs2.enable = true;
|
||||||
|
|
|
||||||
36
flake.lock
generated
36
flake.lock
generated
|
|
@ -102,11 +102,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767850628,
|
"lastModified": 1767910483,
|
||||||
"narHash": "sha256-D3QzdIT11J66I4mzwmIpAGLzPAcbCS2VaKN8fmOe6+E=",
|
"narHash": "sha256-MOU5YdVu4DVwuT5ztXgQpPuRRBjSjUGIdUzOQr9iQOY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "8c8a16d41353a174767c38b962359b51a56ca02e",
|
"rev": "82fb7dedaad83e5e279127a38ef410bcfac6d77c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -179,11 +179,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767185284,
|
"lastModified": 1768397375,
|
||||||
"narHash": "sha256-ljDBUDpD1Cg5n3mJI81Hz5qeZAwCGxon4kQW3Ho3+6Q=",
|
"narHash": "sha256-7QqbFi3ERvKjEdAzEYPv7iSGwpUKSrQW5wPLMFq45AQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "40b1a28dce561bea34858287fbb23052c3ee63fe",
|
"rev": "efe2094529d69a3f54892771b6be8ee4a0ebef0f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -195,11 +195,11 @@
|
||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixos-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767767207,
|
"lastModified": 1768305791,
|
||||||
"narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=",
|
"narHash": "sha256-AIdl6WAn9aymeaH/NvBj0H9qM+XuAuYbGMZaP0zcXAQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5912c1772a44e31bf1c63c0390b90501e5026886",
|
"rev": "1412caf7bf9e660f2f962917c14b1ea1c3bc695e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -227,11 +227,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767799921,
|
"lastModified": 1768323494,
|
||||||
"narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=",
|
"narHash": "sha256-yBXJLE6WCtrGo7LKiB6NOt6nisBEEkguC/lq/rP3zRQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d351d0653aeb7877273920cd3e823994e7579b0b",
|
"rev": "2c3e5ec5df46d3aeee2a1da0bfedd74e21f4bf3a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -243,11 +243,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767767207,
|
"lastModified": 1768305791,
|
||||||
"narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=",
|
"narHash": "sha256-AIdl6WAn9aymeaH/NvBj0H9qM+XuAuYbGMZaP0zcXAQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5912c1772a44e31bf1c63c0390b90501e5026886",
|
"rev": "1412caf7bf9e660f2f962917c14b1ea1c3bc695e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -263,11 +263,11 @@
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767883949,
|
"lastModified": 1768451253,
|
||||||
"narHash": "sha256-emo9Kb/J/lTHgELg2E39kGIv3qlLtGWFpv75BKnmGGU=",
|
"narHash": "sha256-lrrqQuxIIlHn4TzOMDkhd/fhuDLtHJsXLuJ8x3SCn4o=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "9e297caa8eb66f91378169bc813e4256e1dc9058",
|
"rev": "216f5786b653a68a7618296c8d54dde43644ab56",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -83,4 +83,6 @@ in
|
||||||
pkgs.framework-tool
|
pkgs.framework-tool
|
||||||
unstable.amd-debug-tools
|
unstable.amd-debug-tools
|
||||||
];
|
];
|
||||||
|
|
||||||
|
schmittlauch.audio-sharing.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue