nixos-config/euhadra.nix

83 lines
1.5 KiB
Nix
Raw Normal View History

2015-06-04 12:12:51 +00:00
{ config, pkgs, ... }:
2020-06-13 14:51:38 +00:00
let mpdStreamingPort = 8080; in
2015-06-04 12:12:51 +00:00
{
imports =
[
2020-07-14 14:47:09 +00:00
./common-headless.nix
./i3.nix
2015-06-04 12:12:51 +00:00
./uefi.nix
2015-12-06 09:03:22 +00:00
./fstrim.nix
2015-06-04 12:12:51 +00:00
];
2015-12-06 09:05:04 +00: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 12:12:51 +00:00
networking.hostName = "euhadra";
networking.hostId = "ddb5f0fd";
services.mpd = {
enable = true;
2017-01-01 12:04:32 +00:00
network.listenAddress = "any";
2020-06-13 14:14:42 +00:00
musicDirectory = "/mnt/aplysia/music";
2015-06-04 12:12:51 +00:00
extraConfig = ''
2017-10-26 20:05:58 +00:00
# audio_output {
# type "alsa"
# name "dac"
# device "sysdefault:CARD=QAMP"
# }
2015-06-04 12:12:51 +00:00
audio_output {
2017-10-26 20:05:58 +00:00
type "pulse"
name "pulse"
2015-06-04 12:12:51 +00:00
}
2015-06-05 14:36:50 +00:00
2020-06-13 14:51:38 +00:00
audio_output {
type "httpd"
name "http"
encoder "flac"
port "${toString mpdStreamingPort}"
}
2015-06-05 14:36:50 +00:00
replaygain "auto"
restore_paused "yes"
2015-06-04 12:12:51 +00:00
'';
};
2017-09-23 12:34:29 +00:00
networking.firewall.allowedTCPPorts = [
config.services.mpd.network.port
4713 # pulseaudio
2020-06-13 14:51:38 +00:00
mpdStreamingPort # mpd streaming
2017-09-23 12:34:29 +00:00
];
2015-06-04 12:12:51 +00:00
environment.systemPackages = with pkgs; [ mpc_cli ];
2017-09-23 12:34:29 +00:00
hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
2015-06-04 12:12:51 +00:00
2015-09-01 12:16:20 +00:00
nixpkgs.config.mpv.vaapiSupport = true;
2017-09-23 12:34:29 +00:00
hardware.pulseaudio = {
2017-10-26 20:05:58 +00:00
systemWide = true;
2017-09-23 12:34:29 +00:00
zeroconf.publish.enable = true;
tcp = {
enable = true;
anonymousClients.allowedIpRanges = [
"127.0.0.1"
"10.57.0.0/16"
];
};
};
2015-06-04 12:12:51 +00:00
}