This commit is contained in:
ChaotiCryptidz 2022-01-25 13:01:22 +00:00
parent bfe467a9eb
commit 66092dd42c
12 changed files with 33 additions and 47 deletions

View file

@ -1,11 +1,3 @@
{ pkgs, inputs, ... }: { { pkgs, inputs, ... }: {
home.packages = with pkgs; [ home.packages = with pkgs; [ jq ripgrep fd pv tmux socat file ];
jq
ripgrep
fd
pv
tmux
socat
file
];
} }

View file

@ -1,3 +1 @@
{ pkgs, ... }: { { pkgs, ... }: { home.packages = with pkgs; [ xdg-utils ]; }
home.packages = with pkgs; [ xdg-utils ];
}

View file

@ -1,11 +1,10 @@
{ tree, ... }: { { tree, ... }: {
imports = with tree; [ imports = with tree;
[
# systemwide pulseaudio w/ recv native localhost # systemwide pulseaudio w/ recv native localhost
# to broadcast to all speakers over rtp # to broadcast to all speakers over rtp
profiles.sound.pulseaudio.pulse-systemwide profiles.sound.pulseaudio.pulse-systemwide
profiles.sound.pulseaudio.pulse-recv-native-localhost profiles.sound.pulseaudio.pulse-recv-native-localhost
] ++ [ ] ++ [ ./hosts/lappy.nix ];
./hosts/lappy.nix
];
} }

View file

@ -1,7 +1,5 @@
{ pkgs, lib, tree, ... }: { { pkgs, lib, tree, ... }: {
imports = [ imports = [ ./mpd-broadcast/broadcast.nix ];
./mpd-broadcast/broadcast.nix
];
environment.systemPackages = with pkgs; [ mpc_cli ]; environment.systemPackages = with pkgs; [ mpc_cli ];
@ -32,7 +30,7 @@
''; '';
}; };
systemd.services.mpd.serviceConfig.After = ["pulseaudio.service"]; systemd.services.mpd.serviceConfig.After = [ "pulseaudio.service" ];
systemd.services.mpd.serviceConfig.StateDirectory = [ "/mpd" ]; systemd.services.mpd.serviceConfig.StateDirectory = [ "/mpd" ];
services.nginx.virtualHosts."stream.owo.monster" = { services.nginx.virtualHosts."stream.owo.monster" = {

View file

@ -9,14 +9,17 @@
''; '';
localUsers = true; localUsers = true;
userlistEnable = true; userlistEnable = true;
userlist = ["ftp-user"]; userlist = [ "ftp-user" ];
localRoot = "/storage"; localRoot = "/storage";
}; };
users.users.ftp-user = { users.users.ftp-user = {
isSystemUser = true; isSystemUser = true;
group = "ftp-user"; group = "ftp-user";
}; };
users.groups.ftp-user = {}; users.groups.ftp-user = { };
networking.firewall.allowedTCPPortRanges = [ { from = 51000; to = 51999; } ]; networking.firewall.allowedTCPPortRanges = [{
from = 51000;
to = 51999;
}];
networking.firewall.allowedTCPPorts = [ 4220 ]; networking.firewall.allowedTCPPorts = [ 4220 ];
} }

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: let { pkgs, ... }:
passwordFile = "/secrets/mpd-music-sync-password"; let passwordFile = "/secrets/mpd-music-sync-password";
in { in {
systemd.tmpfiles.rules = [ "d /music 0755 mpd users -" ]; systemd.tmpfiles.rules = [ "d /music 0755 mpd users -" ];
systemd.services.mpd-music-sync = { systemd.services.mpd-music-sync = {

View file

@ -9,7 +9,8 @@
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d /var/lib/mpd 0755 mpd mpd -" "d /var/lib/mpd 0755 mpd mpd -"
"d /var/lib/mpd/data 0755 mpd mpd -" "d /var/lib/mpd/data 0755 mpd mpd -"
"d /var/lib/mpd/playlists 0755 mpd mpd -" ]; "d /var/lib/mpd/playlists 0755 mpd mpd -"
];
services.mpd = { services.mpd = {
enable = true; enable = true;
@ -26,5 +27,6 @@
''; '';
}; };
systemd.services.mpd.serviceConfig.StateDirectory = [ "/music" "/var/lib/mpd" ]; systemd.services.mpd.serviceConfig.StateDirectory =
[ "/music" "/var/lib/mpd" ];
} }

View file

@ -7,8 +7,7 @@
# The serial ports listed here are: # The serial ports listed here are:
# - ttyS0: for Tegra (Jetson TX1) # - ttyS0: for Tegra (Jetson TX1)
# - ttyAMA0: for QEMU's -machine virt # - ttyAMA0: for QEMU's -machine virt
boot.kernelParams = boot.kernelParams = [ "console=tty0" ];
[ "console=tty0" ];
sdImage = { sdImage = {
populateFirmwareCommands = let populateFirmwareCommands = let

View file

@ -4,8 +4,7 @@
after = [ "dev-ttyAMA0.device" ]; after = [ "dev-ttyAMA0.device" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
ExecStart = ExecStart = "${pkgs.bluez}/bin/btattach -B /dev/ttyS1 -P bcm -S 3000000";
"${pkgs.bluez}/bin/btattach -B /dev/ttyS1 -P bcm -S 3000000";
}; };
}; };
} }

View file

@ -1,7 +1,5 @@
{ pkgs, tree, lib, ... }: { { pkgs, tree, lib, ... }: {
imports = with tree; [ imports = with tree; [ profiles.connectivity.bluetooth ];
profiles.connectivity.bluetooth
];
hardware.pulseaudio = { hardware.pulseaudio = {
extraModules = with pkgs; [ pkgs.pulseaudio-modules-bt ]; extraModules = with pkgs; [ pkgs.pulseaudio-modules-bt ];

View file

@ -1,4 +1,4 @@
{tree, ...}: { { tree, ... }: {
imports = with tree; [ profiles.sound.pulseaudio.pulse ]; imports = with tree; [ profiles.sound.pulseaudio.pulse ];
hardware.pulseaudio = { hardware.pulseaudio = {
systemWide = true; systemWide = true;

View file

@ -1,7 +1,5 @@
{ config, pkgs, ... }: { { config, pkgs, ... }: {
sound.enable = true; sound.enable = true;
nixpkgs.config.pulseaudio = true; nixpkgs.config.pulseaudio = true;
hardware.pulseaudio = { hardware.pulseaudio = { enable = true; };
enable = true;
};
} }