diff --git a/nixos/components/default.nix b/nixos/components/default.nix
index ec9bf17..1f86233 100644
--- a/nixos/components/default.nix
+++ b/nixos/components/default.nix
@@ -1,8 +1,9 @@
{
imports = [
./gui
+ ./mainUser.nix
+ ./media
./network
./terminal
- ./mainUser.nix
];
}
diff --git a/nixos/components/media/default.nix b/nixos/components/media/default.nix
new file mode 100644
index 0000000..5f997e5
--- /dev/null
+++ b/nixos/components/media/default.nix
@@ -0,0 +1,13 @@
+{ pkgs, lib, ... }:
+with lib;
+{
+ options.components.media = {
+ enable = lib.mkEnableOption "Media configurations";
+ };
+
+ imports = [ ./icecast.nix ];
+
+ config = mkIf config.components.media.enable {
+ # todo extract xorg stuff to prepare wayland
+ };
+}
diff --git a/nixos/components/media/icecast.nix b/nixos/components/media/icecast.nix
new file mode 100644
index 0000000..4e9074b
--- /dev/null
+++ b/nixos/components/media/icecast.nix
@@ -0,0 +1,71 @@
+# --------------------------------------------------
+# How to use?
+# * start the icecast
+# * connect via mixxx to it.
+# * add the podcast to mpd in the same network
+# --------------------------------------------------
+{ pkgs, config, lib, ... }:
+with lib;
+
+let
+ # todo : make option
+ user = "username";
+ password = "password";
+ mountPoint = "/radio.mp3";
+ maxListeners = 20;
+in
+
+{
+
+ options.components.media.icecast.enable = mkOption {
+ type = lib.types.bool;
+ #default = config.components.media.enable;
+ default = false;
+ };
+
+ config = mkIf (config.components.media.icecast.enable) {
+
+ services.icecast = {
+ enable = true;
+ hostname = config.networking.hostName;
+ admin = {
+ user = "palo";
+ password = "palo";
+ };
+ # http://icecast.org/docs/icecast-2.4.1/config-file.html
+ extraConf = ''
+
+ ${mountPoint}
+ ${user}
+ ${password}
+ ${toString maxListeners}
+ 3600
+ UTF8
+ 1
+ Palos Awesome Stream
+ Kick ass Tracks
+ https://ingolf-wagner.de
+ classical
+ 320
+ application/ogg
+ vorbis
+ 1
+ 65536
+ 4096
+
+ '';
+ };
+
+ # use port which I can see in iptable -L -v -n
+ networking.firewall = {
+ allowedTCPPorts = [ config.services.icecast.listen.port ];
+ allowedUDPPorts = [ config.services.icecast.listen.port ];
+ };
+
+ # don't want to have the service running all the time
+ # ---------------------------------------------------
+ systemd.services.icecast.wantedBy = lib.mkForce [ ];
+ systemd.services.icecast.after = lib.mkForce [ ];
+
+ };
+}
diff --git a/nixos/machines/chungus/network-wireguard.nix b/nixos/machines/chungus/network-wireguard.nix
index 7d20cee..d38dec2 100644
--- a/nixos/machines/chungus/network-wireguard.nix
+++ b/nixos/machines/chungus/network-wireguard.nix
@@ -3,7 +3,7 @@
# networking.firewall.trustedInterfaces = [ "wg0" ];
networking.firewall.allowedUDPPorts = [ 51820 ];
sops.secrets.wireguard_private = { };
-
+ #boot.kernel.sysctl."net.ipv4.ip_forward" = true;
# Enable WireGuard
networking.wg-quick.interfaces = {
diff --git a/nixos/system/desktop/audio.nix b/nixos/system/desktop/audio.nix
deleted file mode 100644
index 3981b13..0000000
--- a/nixos/system/desktop/audio.nix
+++ /dev/null
@@ -1,73 +0,0 @@
-{ config, lib, pkgs, ... }:
-let
-
- library = import ../../library { inherit pkgs lib; };
-
- mixxxBin = pkgs.writeShellScriptBin "mixxx"
- "${pkgs.mixxx}/bin/mixxx --settingsPath ${config.users.users.mainUser.home}/music-library/mixxx";
- mixxxDesktop = library.desktopFile mixxxBin { longName = "Mixxx"; };
-
- mixxxFreeBin = pkgs.writeShellScriptBin "mixxx-free"
- "${pkgs.mixxx}/bin/mixxx --settingsPath ${config.users.users.mainUser.home}/music-library-free/mixxx";
- mixxxFreeDesktop = library.desktopFile mixxxFreeBin { longName = "Mixxx"; };
-
-in
-{
-
- system.custom.audio = {
- enable = true;
- sinks = [{
- name = "movieLimiterSink";
- queue = [
- {
- # compress all sounds
- plugin = "dyson_compress_1403";
- label = "dysonCompress";
- control = [
- "0" # peak limit (dB)
- "1" # release time (secons)
- "0.2" # fast compression ration (unknown what that means)
- "0.8" # compression ratio
- ];
- }
- {
- # limit sound
- plugin = "fast_lookahead_limiter_1913";
- label = "fastLookaheadLimiter";
- control = [
- "20" # input gain (db)
- "-10" # limit (db)
- "1.1" # release time (s)
- ];
- }
- {
- # avoid deep sounds
- plugin = "dj_eq_1901";
- label = "dj_eq";
- control = [
- "-9" # low gain (db) (100Hz)
- "0" # mid gain (db) (1000Hz)
- "0" # high gain (db) (10000Hz)
- ];
- }
- ];
- }];
- };
-
- programs.custom = {
- easytag.enable = true;
- espeak.enable = true;
- };
-
- environment.systemPackages = with pkgs; [
- audacious
- sox
- id3v2
-
- mixxxBin
- mixxxDesktop
- mixxxFreeBin
- mixxxFreeDesktop
- ];
-
-}
diff --git a/nixos/system/desktop/icecast.nix b/nixos/system/desktop/icecast.nix
deleted file mode 100644
index 99fc427..0000000
--- a/nixos/system/desktop/icecast.nix
+++ /dev/null
@@ -1,61 +0,0 @@
-# --------------------------------------------------
-# How to use?
-# * start the icecast
-# * connect via mixxx to it.
-# * add the podcast to mpd in the same network
-# --------------------------------------------------
-
-{ pkgs, config, lib, ... }:
-
-let
- user = "username";
- password = "password";
- mountPoint = "/radio.mp3";
- maxListeners = 20;
-
-in
-{
-
- services.icecast = {
- enable = true;
- hostname = config.networking.hostName;
- admin = {
- user = "palo";
- password = "palo";
- };
- # http://icecast.org/docs/icecast-2.4.1/config-file.html
- extraConf = ''
-
- ${mountPoint}
- ${user}
- ${password}
- ${toString maxListeners}
- 3600
- UTF8
- 1
- Palos Awesome Stream
- Kick ass Tracks
- https://ingolf-wagner.de
- classical
- 320
- application/ogg
- vorbis
- 1
- 65536
- 4096
-
- '';
- };
-
- # use port which I can see in iptable -L -v -n
- networking.firewall = {
- allowedTCPPorts = [ config.services.icecast.listen.port ];
- allowedUDPPorts = [ config.services.icecast.listen.port ];
- };
-
- # don't want to have the service running all the time
- # ---------------------------------------------------
- systemd.services.icecast.wantedBy = lib.mkForce [ ];
- systemd.services.icecast.after = lib.mkForce [ ];
-
-}