arcadia.nix (2239B)
1 # HTPC 2 3 { config, pkgs, domain, machine, username, fullname, sshkey, ... }: 4 5 let 6 home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz; # stable 7 # home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/master.tar.gz; # unstable 8 in 9 10 { 11 # Common OS imports 12 imports = 13 [ # Include the results of the hardware scan. 14 ./${machine}-hardware.nix 15 ../common/audio.nix 16 ../common/flakes.nix 17 ../common/garbage.nix 18 ../common/locale.nix 19 ../common/nfs.nix 20 # ../common/kodi-module.nix 21 ../common/packages.nix 22 (import ../common/syncthing.nix {inherit config pkgs username;}) 23 (import ../common/user.nix {inherit config pkgs username fullname;}) 24 (import ../common/ssh.nix {inherit username sshkey;}) 25 ../scripts/htpc-launcher.nix 26 (import "${home-manager}/nixos") 27 ]; 28 29 # Home-Manager 30 home-manager.backupFileExtension = "hm-bak"; 31 home-manager.users.${username} = { pkgs, ... }: { 32 imports = [ 33 ../home/fish.nix 34 ../home/hyprland.nix 35 ../home/ghostty.nix 36 (import ../home/kodi.nix {inherit username;}) 37 (import ../home/ssh.nix {inherit domain username;}) 38 ]; 39 40 # The state version is required and should stay at the version you 41 # originally installed. 42 home.stateVersion = "24.11"; 43 }; 44 45 # Hostname 46 networking.hostName = "arcadia"; # Define your hostname. 47 48 # Hardware acceleration 49 hardware.graphics = { 50 enable = true; 51 extraPackages = with pkgs; [ 52 intel-media-driver 53 libvdpau-va-gl 54 vaapiIntel 55 ]; 56 }; 57 58 # Enable programs 59 programs.hyprland.enable = true; 60 61 # Packages 62 environment.systemPackages = with pkgs; [ 63 # duckstation 64 hyprland 65 kodiPackages.inputstream-adaptive 66 kodi-wayland 67 moonlight-qt 68 mpv 69 # spotify 70 yt-dlp 71 ]; 72 73 # Kodi settings 74 # HDMI CEC input groups 75 users.users.${username}.extraGroups = [ "networkmanager" "wheel" "input" "dialout" "video" ]; # Extra groups for Kodi CEC input 76 77 # Web UI firewall rules 78 networking.firewall.allowedTCPPorts = [ 8080 ]; 79 networking.firewall.allowedUDPPorts = [ 8080 ]; 80 81 system.stateVersion = "24.11"; 82 83 }