# Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ]; # Boot boot.loader.timeout = 1; boot.loader.systemd-boot.enable = true; # Set hostname networking.hostName = "kodi-nix"; # Set time zone. time.timeZone = "America/Los_Angeles"; # Network settings networking.interfaces.{{ ansible_default_ipv4.interface }}.useDHCP = true; networking.enableIPv6 = false; networking.firewall.allowedTCPPorts = [ 8080 ]; networking.firewall.allowedUDPPorts = [ 8080 ]; # Kodi services.xserver.enable = true; services.xserver.desktopManager.kodi.enable = true; services.xserver.desktopManager.kodi.package = pkgs.kodi.withPackages (p: with p; [ kodi pvr-hts ]); services.xserver.displayManager.autoLogin.enable = true; services.xserver.displayManager.autoLogin.user = "kodi"; services.xserver.displayManager.job.preStart = "/run/current-system/sw/bin/systemctl start network-online.target"; services.xserver.displayManager.sessionCommands = "xset s off -dpms"; users.users.kodi.isNormalUser = true; # Hardware sound.enable = true; hardware.pulseaudio.enable = true; boot.kernelPackages = pkgs.linuxPackages_latest; # Nix defaults to LTS kernel # Packages environment.systemPackages = with pkgs; [ python3 vim nano htop glances nethogs tmux inxi ]; # SSH services.openssh.enable = true; users.users.root.openssh.authorizedKeys.keys = [ {% for pubkey in ssh_root_keys %} "{{ pubkey }}" {% endfor %} ]; # 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. It‘s 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.11"; # Did you read the comment? }