pub-solar-os/hosts/fae.nix

94 lines
2.4 KiB
Nix
Raw Normal View History

2022-01-19 00:13:15 +00:00
{ 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
2022-01-31 16:51:42 +00:00
profiles.users.pub-solar
profiles.base-user
profiles.pub-solar-iso
2022-01-19 00:13:15 +00:00
];
config = {
2022-09-06 09:31:55 +00:00
pub-solar.core.iso-options.enable = true;
2022-01-19 00:13:15 +00:00
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
};
2022-01-31 16:51:42 +00:00
environment.systemPackages = with pkgs; [
(kodi-gbm.withPackages (p: with p; [ jellyfin netflix youtube ]))
];
2022-01-19 00:13:15 +00:00
services.openssh.enable = true;
2022-01-31 16:51:42 +00:00
networking.firewall = {
allowedTCPPorts = [ 8080 ];
allowedUDPPorts = [ 8080 ];
};
2022-01-19 00:13:15 +00:00
security.sudo.extraConfig = lib.mkAfter ''
%wheel ALL=(ALL) NOPASSWD:ALL
'';
2022-01-31 16:51:42 +00:00
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
'';
};
2022-01-19 00:13:15 +00:00
# Enable GPU acceleration
hardware.raspberry-pi."4".fkms-3d.enable = true;
2022-01-31 16:51:42 +00:00
# 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";
};
};
2022-01-19 00:13:15 +00:00
hardware.pulseaudio.enable = true;
2022-01-31 16:51:42 +00:00
# custom raspi boot loader is already present
boot.loader.systemd-boot.enable = lib.mkForce false;
2022-07-08 12:13:41 +00:00
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.05"; # Did you read the comment?
2022-01-19 00:13:15 +00:00
};
}