diff --git a/configuration-nas.nix b/configuration-nas.nix index 89d676d..5bd3449 100644 --- a/configuration-nas.nix +++ b/configuration-nas.nix @@ -8,11 +8,13 @@ let password = "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06"; hostname = "jallen-nas"; timezone = "America/Chicago"; + main-pool = ''"Main\ Pool"''; in { imports = [ # Include the results of the hardware scan. - ./hardware-configuration-nas.nix + ./hardware-configuration.nix + ./nas-apps/jellyfin.nix ]; # Enable nix flakes and nix-command tools @@ -33,14 +35,25 @@ in }; # Override kernel to latest - kernelPackages = pkgs.linuxPackages_latest; + kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; kernelParams = [ - # none for now + "nohibernate" ]; consoleLogLevel = 3; bootspec.enable = true; + + supportedFilesystems = [ "zfs" ]; + + # zfs = { + # extraPools = [ + # #"Main" + " " + "Pool" + # #main-pool + # #''"Safe\ SSD"'' + # "Junk" + # ]; + # }; }; # Hardware configs @@ -62,11 +75,11 @@ in modesetting.enable = true; # Nvidia power management. Experimental, and can cause sleep/suspend to fail. - powerManagement.enable = true; + powerManagement.enable = false; # Fine-grained power management. Turns off GPU when not in use. # Experimental and only works on modern Nvidia GPUs (Turing or newer). - powerManagement.finegrained = true; + powerManagement.finegrained = false; # Use the NVidia open source kernel module (not to be confused with the # independent third-party "nouveau" open source driver). @@ -92,6 +105,8 @@ in # Services configs services = { + openssh.enable = true; + # Enable firmware updates fwupd.enable = true; @@ -105,9 +120,9 @@ in # Enable the Plasma 6 Desktop Environment. displayManager = { sddm.enable = true; - defaultSession = "plasma"; + defaultSession = "plasmawayland"; }; - desktopManager.plasma6.enable = true; + desktopManager.plasma5.enable = true; }; # Enable CUPS to print documents. @@ -122,11 +137,11 @@ in }; # enable auto discovery of printers - avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; - }; +# avahi = { +# enable = true; +# nssmdns4 = true; +# openFirewall = true; +# }; # Enable Flatpak flatpak.enable = false; @@ -136,6 +151,8 @@ in networking = { hostName = hostname; + hostId = "4b501480"; + # Enable Network Manager networkmanager.enable = true; }; @@ -179,6 +196,7 @@ in users.users."${user}" = { isNormalUser = true; extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. + initialHashedPassword = password; shell = pkgs.fish; packages = with pkgs; [ neofetch @@ -212,4 +230,3 @@ in system.stateVersion = "23.11"; # Did you read the comment? } - diff --git a/nas-apps/jellyfin.nix b/nas-apps/jellyfin.nix new file mode 100644 index 0000000..a537a6d --- /dev/null +++ b/nas-apps/jellyfin.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = [ + pkgs.jellyfin + pkgs.jellyfin-web + pkgs.jellyfin-ffmpeg + ]; + + services.jellyfin = { + enable = true; + openFirewall = true; + }; +} \ No newline at end of file