nix-config/hosts/odyssey/default.nix

103 lines
2.3 KiB
Nix

{ config, lib, pkgs, ... }:
with lib.my;
{
imports = [
./hardware-configuration.nix
../desktop.nix
];
boot.loader.systemd-boot = {
enable = true;
graceful = true;
netbootxyz.enable = true;
};
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "odyssey";
networking.hostId = "c5e68d78";
networking.networkmanager.enable = true;
environment.etc."pipewire/pipewire.conf.d/surround.conf".text = ''
context.modules = [
{
name = libpipewire-module-loopback
args = {
node.description = "1824c Surround"
capture.props = {
node.name = "1824c_Speakers"
media.class = "Audio/Sink"
audio.position = [ FL FR FC SL SR LFE ]
}
playback.props = {
node.name = "playback.1824c_Speakers"
audio.position = [ AUX0 AUX1 AUX2 AUX3 AUX4 AUX5 ]
target.object = "alsa_output.usb-PreSonus_Studio_1824c_SC4E21110775-00.multichannel-output"
stream.dont-remix = true
node.passive = true
}
}
}
]
'';
nix.package = pkgs.nixFlakes;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
virtualisation.libvirtd.enable = true;
users.defaultUserShell = pkgs.zsh;
system.stateVersion = "22.11";
services.nix-serve = {
enable = true;
secretKeyFile = "/var/cache-priv-key.pem";
};
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
"odyssey.mesh.vimium.net" = {
locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
};
};
};
modules = {
desktop = {
apps.qbittorrent.enable = true;
browsers = {
firefox.enable = true;
};
media.graphics = {
modeling.enable = true;
raster.enable = true;
vector.enable = true;
};
media.recording = {
audio.enable = true;
video.enable = true;
};
};
dev = {
node.enable = true;
};
editors = {
neovim.enable = true;
};
security = {
gpg.enable = true;
pass.enable = true;
};
shell = {
git.enable = true;
zsh.enable = true;
};
};
}