nixos-config/euhadra.nix

84 lines
1.6 KiB
Nix
Raw Normal View History

2015-06-04 14:12:51 +02:00
{ config, pkgs, ... }:
2020-06-13 16:51:38 +02:00
let mpdStreamingPort = 8080; in
2015-06-04 14:12:51 +02:00
{
imports =
[
./common.nix
./uefi.nix
2015-12-06 10:03:22 +01:00
./fstrim.nix
2015-06-04 14:12:51 +02:00
];
2015-12-06 10:05:04 +01:00
environment.etc."lvm/lvm.conf".text = ''
devices {
issue_discards = 1
}
'';
boot.initrd.luks.devices = [
{
name = "euhadra_crypt";
device = "/dev/disk/by-uuid/328a9ede-0958-490b-8e82-62b06b839e21";
preLVM = true;
allowDiscards = true;
}
];
2015-06-04 14:12:51 +02:00
networking.hostName = "euhadra";
networking.hostId = "ddb5f0fd";
services.mpd = {
enable = true;
2017-01-01 13:04:32 +01:00
network.listenAddress = "any";
2020-06-13 16:14:42 +02:00
musicDirectory = "/mnt/aplysia/music";
2015-06-04 14:12:51 +02:00
extraConfig = ''
2017-10-26 22:05:58 +02:00
# audio_output {
# type "alsa"
# name "dac"
# device "sysdefault:CARD=QAMP"
# }
2015-06-04 14:12:51 +02:00
audio_output {
2017-10-26 22:05:58 +02:00
type "pulse"
name "pulse"
2015-06-04 14:12:51 +02:00
}
2015-06-05 16:36:50 +02:00
2020-06-13 16:51:38 +02:00
audio_output {
type "httpd"
name "http"
encoder "flac"
port "${toString mpdStreamingPort}"
}
2015-06-05 16:36:50 +02:00
replaygain "auto"
restore_paused "yes"
2015-06-04 14:12:51 +02:00
'';
};
2017-09-23 14:34:29 +02:00
networking.firewall.allowedTCPPorts = [
config.services.mpd.network.port
4713 # pulseaudio
2020-06-13 16:51:38 +02:00
mpdStreamingPort # mpd streaming
2017-09-23 14:34:29 +02:00
];
2015-06-04 14:12:51 +02:00
environment.systemPackages = with pkgs; [ mpc_cli ];
2017-09-23 14:34:29 +02:00
hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
2015-06-04 14:12:51 +02:00
2015-09-01 14:16:20 +02:00
nixpkgs.config.mpv.vaapiSupport = true;
2017-09-23 14:34:29 +02:00
hardware.pulseaudio = {
2017-10-26 22:05:58 +02:00
systemWide = true;
2017-09-23 14:34:29 +02:00
zeroconf.publish.enable = true;
tcp = {
enable = true;
anonymousClients.allowedIpRanges = [
"127.0.0.1"
"10.57.0.0/16"
];
};
};
2019-11-05 18:25:34 +01:00
services.blueman.enable = true;
2015-06-04 14:12:51 +02:00
}