os/hosts/fae.nix
2022-01-31 17:51:42 +01:00

86 lines
1.9 KiB
Nix

{ config, lib, pkgs, profiles, ... }:
{
imports = [
# profiles.networking
#profiles.core
"${fetchTarball {
url = "https://github.com/NixOS/nixos-hardware/archive/8f1bf828d8606fe38a02df312cf14546ae200a72.tar.gz";
sha256 = "11milap153g3f63fcrcv4777vd64f7wlfkk9p3kpxi6dqd2sxvh4";
}
}/raspberry-pi/4"
profiles.users.root # make sure to configure ssh keys
profiles.users.pub-solar
profiles.base-user
profiles.pub-solar-iso
];
config = {
pub-solar.x-os.iso-options.enable = true;
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
};
environment.systemPackages = with pkgs; [
(kodi-gbm.withPackages (p: with p; [ jellyfin netflix youtube ]))
];
services.openssh.enable = true;
networking.firewall = {
allowedTCPPorts = [ 8080 ];
allowedUDPPorts = [ 8080 ];
};
security.sudo.extraConfig = lib.mkAfter ''
%wheel ALL=(ALL) NOPASSWD:ALL
'';
nix = {
autoOptimiseStore = true;
gc.automatic = true;
optimise.automatic = true;
useSandbox = true;
allowedUsers = [ "@wheel" ];
trustedUsers = [ "root" "@wheel" ];
extraOptions = ''
min-free = 536870912
keep-outputs = true
keep-derivations = true
fallback = true
'';
};
# Enable GPU acceleration
hardware.raspberry-pi."4".fkms-3d.enable = true;
# Define a user account for kodi
users.extraUsers.kodi.isNormalUser = true;
services.xserver = {
enable = true;
desktopManager.kodi.enable = true;
desktopManager.kodi.package = pkgs.kodi-gbm;
displayManager = {
autoLogin.enable = true;
autoLogin.user = "kodi";
};
};
hardware.pulseaudio.enable = true;
# custom raspi boot loader is already present
boot.loader.systemd-boot.enable = lib.mkForce false;
};
}