summaryrefslogtreecommitdiffstats
path: root/lass/2configs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-04-26 19:22:50 +0200
committerlassulus <lassulus@lassul.us>2020-04-27 09:32:46 +0200
commit90a2b572d45eb6989e38546049cbed4c0b842ca1 (patch)
treebc2b14b6706b9f741df59f13e68d859e30a081c7 /lass/2configs
parent12570d3241eb8da1177e8429ee5340f27cc0bd47 (diff)
l: add home-media.nix
Diffstat (limited to 'lass/2configs')
-rw-r--r--lass/2configs/home-media.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/lass/2configs/home-media.nix b/lass/2configs/home-media.nix
new file mode 100644
index 000000000..7e10aed34
--- /dev/null
+++ b/lass/2configs/home-media.nix
@@ -0,0 +1,23 @@
+with import <stockholm/lib>;
+{ pkgs, ... }:
+{
+ users.users.media = {
+ isNormalUser = true;
+ uid = genid_uint31 "media";
+ extraGroups = [ "video" "audio" ];
+ };
+
+ services.xserver.displayManager.lightdm.autoLogin = {
+ enable = true;
+ user = "media";
+ };
+
+ hardware.pulseaudio.configFile = pkgs.writeText "pulse.pa" ''
+ .include ${pkgs.pulseaudioFull}/etc/pulse/default.pa
+ load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;10.42.0.0/24 auth-anonymous=1
+ '';
+
+ krebs.iptables.tables.filter.INPUT.rules = [
+ { predicate = "-p tcp --dport 4713"; target = "ACCEPT"; } # pulseaudio
+ ];
+}