xin/hosts/tv/default.nix

115 lines
2.1 KiB
Nix
Raw Normal View History

2024-05-27 21:12:29 -06:00
{ pkgs
, config
, xinlib
2024-05-27 21:12:29 -06:00
, ...
}:
let
inherit (xinlib) todo;
2024-05-27 21:12:29 -06:00
pubKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7v+/xS8832iMqJHCWsxUZ8zYoMWoZhjj++e26g1fLT europa"
] ++ config.myconf.managementPubKeys;
myKodi = pkgs.kodi.withPackages (kp: with kp; [
certifi
infotagger
invidious
jellyfin
keymap
sendtokodi
somafm
2024-05-27 21:12:29 -06:00
]);
in
{
_module.args.isUnstable = true;
2024-05-27 21:12:29 -06:00
imports = [
./hardware-configuration.nix
2024-06-13 21:16:59 -06:00
../../configs/zsh.nix
2024-07-01 13:15:07 -06:00
../../configs/ssh.nix
2024-05-27 21:12:29 -06:00
];
2024-05-31 08:29:22 -06:00
needsDeploy.enable = false;
nixpkgs.config.permittedInsecurePackages = todo "tv using insecure youtube-dl!" [
2024-07-14 17:23:04 -06:00
"python3.12-youtube-dl-2021.12.17"
];
2024-05-27 21:12:29 -06:00
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
2024-05-27 21:12:29 -06:00
};
2024-05-27 21:12:29 -06:00
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = [ "snd-intel-dspcfg.dsp_driver=3" ];
2024-05-27 21:12:29 -06:00
};
networking = {
hostName = "tv";
networkmanager.enable = true;
wireless.userControlled.enable = true;
2024-05-27 21:12:29 -06:00
firewall = {
enable = true;
allowedTCPPorts = [ 22 ];
checkReversePath = "loose";
};
};
environment.sessionVariables = {
NIX_SSL_CERT_FILE = "/etc/ssl/certs/ca-bundle.crt";
};
pipewire.enable = true;
2024-06-13 21:16:59 -06:00
programs.zsh.enable = true;
2024-06-13 21:17:18 -06:00
2024-05-27 21:12:29 -06:00
services = {
avahi.enable = true;
openssh.settings.X11Forwarding = true;
2024-05-27 21:12:29 -06:00
fwupd = {
enable = true;
};
libinput.enable = true;
2024-05-27 21:12:29 -06:00
xserver = {
enable = true;
desktopManager = {
kodi = {
enable = true;
package = myKodi;
};
};
};
displayManager = {
autoLogin = {
user = "tv";
enable = true;
2024-05-27 21:12:29 -06:00
};
};
};
users = {
users = {
2024-06-13 21:16:59 -06:00
root = {
openssh.authorizedKeys.keys = pubKeys;
shell = pkgs.zsh;
};
2024-05-27 21:12:29 -06:00
tv = {
openssh.authorizedKeys.keys = pubKeys;
2024-06-13 21:16:59 -06:00
shell = pkgs.zsh;
2024-05-27 21:12:29 -06:00
isNormalUser = true;
2024-06-09 21:55:58 -06:00
extraGroups = [ "dialout" "plugdev" ];
2024-05-27 21:12:29 -06:00
};
};
};
environment.systemPackages = with pkgs; [
pavucontrol
];
hardware.firmware = with pkgs; [
sof-firmware
];
2024-05-27 21:12:29 -06:00
system = {
stateVersion = "22.11";
};
}