2024-05-27 21:12:29 -06:00
|
|
|
{ pkgs
|
2024-05-28 11:44:27 -06:00
|
|
|
, config
|
2024-07-14 19:14:42 -06:00
|
|
|
, xinlib
|
2024-05-27 21:12:29 -06:00
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
2024-07-14 19:14:42 -06:00
|
|
|
inherit (xinlib) todo;
|
2024-05-27 21:12:29 -06:00
|
|
|
pubKeys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7v+/xS8832iMqJHCWsxUZ8zYoMWoZhjj++e26g1fLT europa"
|
2024-05-28 11:44:27 -06:00
|
|
|
] ++ config.myconf.managementPubKeys;
|
2024-05-28 13:10:17 -06:00
|
|
|
myKodi = pkgs.kodi.withPackages (kp: with kp; [
|
|
|
|
certifi
|
|
|
|
infotagger
|
|
|
|
invidious
|
|
|
|
jellyfin
|
2024-05-29 21:09:40 -06:00
|
|
|
keymap
|
2024-05-29 22:50:38 -06:00
|
|
|
sendtokodi
|
2024-05-28 13:10:17 -06:00
|
|
|
somafm
|
2024-05-27 21:12:29 -06:00
|
|
|
]);
|
|
|
|
in
|
|
|
|
{
|
2024-05-28 11:44:27 -06:00
|
|
|
_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;
|
|
|
|
|
2024-07-14 19:14:42 -06:00
|
|
|
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 = {
|
2024-05-28 11:44:27 -06:00
|
|
|
loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
2024-05-27 21:12:29 -06:00
|
|
|
};
|
2024-05-28 11:44:27 -06:00
|
|
|
|
2024-05-27 21:12:29 -06:00
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
2024-05-29 21:09:40 -06:00
|
|
|
kernelParams = [ "snd-intel-dspcfg.dsp_driver=3" ];
|
2024-05-27 21:12:29 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
hostName = "tv";
|
|
|
|
networkmanager.enable = true;
|
2024-05-29 21:09:40 -06:00
|
|
|
wireless.userControlled.enable = true;
|
2024-05-27 21:12:29 -06:00
|
|
|
firewall = {
|
|
|
|
enable = true;
|
|
|
|
allowedTCPPorts = [ 22 ];
|
|
|
|
checkReversePath = "loose";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-29 08:35:58 -06:00
|
|
|
environment.sessionVariables = {
|
|
|
|
NIX_SSL_CERT_FILE = "/etc/ssl/certs/ca-bundle.crt";
|
|
|
|
};
|
|
|
|
|
2024-05-29 21:09:40 -06:00
|
|
|
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 = {
|
2024-05-29 22:50:38 -06:00
|
|
|
avahi.enable = true;
|
2024-05-29 21:09:40 -06:00
|
|
|
openssh.settings.X11Forwarding = true;
|
2024-05-27 21:12:29 -06:00
|
|
|
fwupd = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2024-05-29 21:09:40 -06:00
|
|
|
libinput.enable = true;
|
2024-05-27 21:12:29 -06:00
|
|
|
xserver = {
|
|
|
|
enable = true;
|
2024-05-28 11:44:27 -06:00
|
|
|
desktopManager = {
|
|
|
|
kodi = {
|
|
|
|
enable = true;
|
|
|
|
package = myKodi;
|
|
|
|
};
|
|
|
|
};
|
2024-05-29 21:09:40 -06:00
|
|
|
};
|
|
|
|
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
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-29 21:09:40 -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";
|
|
|
|
};
|
|
|
|
}
|