diff --git a/provision/nixos/hosts/torus/configuration.nix b/provision/nixos/hosts/torus/configuration.nix index 92154561..1fa7d42b 100644 --- a/provision/nixos/hosts/torus/configuration.nix +++ b/provision/nixos/hosts/torus/configuration.nix @@ -61,12 +61,12 @@ ]; # Enable user services - services = { - syncthing = { - enable = true; - user = "${user}"; - }; - }; + #services = { + # syncthing = { + # enable = true; + # user = "${user}"; + # }; + #}; # Enable the OpenSSH daemon. services.openssh.enable = true; @@ -80,9 +80,15 @@ # Enable modules imports = [ ../../modules ]; modules = { + server = { + jellyfin.enable = true; + }; services = { samba.enable = true; }; + devel = { + tooling.enable = true; + }; }; system.stateVersion = "23.05"; # Did you read the comment? diff --git a/provision/nixos/hosts/torus/hardware.nix b/provision/nixos/hosts/torus/hardware.nix index 5d7eaad9..b4a11835 100644 --- a/provision/nixos/hosts/torus/hardware.nix +++ b/provision/nixos/hosts/torus/hardware.nix @@ -8,43 +8,48 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; + boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae"; + { device = "/dev/disk/by-uuid/fbbf0ca2-4f05-48ff-b341-7da2895260cc"; fsType = "btrfs"; options = [ "subvol=root" ]; }; + fileSystems."/engi" = + { device = "/dev/disk/by-uuid/89227565-1b54-41ec-adef-cd4ddd8565c5"; + fsType = "btrfs"; + }; + fileSystems."/home" = - { device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae"; + { device = "/dev/disk/by-uuid/fbbf0ca2-4f05-48ff-b341-7da2895260cc"; fsType = "btrfs"; options = [ "subvol=home" ]; }; fileSystems."/nix" = - { device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae"; + { device = "/dev/disk/by-uuid/fbbf0ca2-4f05-48ff-b341-7da2895260cc"; fsType = "btrfs"; options = [ "subvol=nix" ]; }; fileSystems."/persist" = - { device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae"; + { device = "/dev/disk/by-uuid/fbbf0ca2-4f05-48ff-b341-7da2895260cc"; fsType = "btrfs"; options = [ "subvol=persist" ]; }; fileSystems."/var/log" = - { device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae"; + { device = "/dev/disk/by-uuid/fbbf0ca2-4f05-48ff-b341-7da2895260cc"; fsType = "btrfs"; - options = [ "subvol=log" ]; + options = [ "subvol=var/log" ]; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/37EE-81E0"; + { device = "/dev/disk/by-uuid/C42C-A103"; fsType = "vfat"; }; @@ -55,8 +60,9 @@ # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/provision/nixos/modules/default.nix b/provision/nixos/modules/default.nix index efa58c8d..ac2d5f10 100644 --- a/provision/nixos/modules/default.nix +++ b/provision/nixos/modules/default.nix @@ -1,4 +1,4 @@ { ... }: { - imports = [ ./desktop ./gaming ./devel ./services ]; + imports = [ ./desktop ./gaming ./devel ./services ./server ]; } diff --git a/provision/nixos/modules/server/default.nix b/provision/nixos/modules/server/default.nix new file mode 100644 index 00000000..d7a8c6f3 --- /dev/null +++ b/provision/nixos/modules/server/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + imports = [ ./jellyfin.nix ]; +} diff --git a/provision/nixos/modules/server/jellyfin.nix b/provision/nixos/modules/server/jellyfin.nix new file mode 100644 index 00000000..1fbb62b0 --- /dev/null +++ b/provision/nixos/modules/server/jellyfin.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, user, ... }: + +let cfg = config.modules.server.jellyfin; +in { + options.modules.server.jellyfin.enable = lib.mkEnableOption "jellyfin"; + config = lib.mkIf cfg.enable { + services.jellyfin.enable = true; + }; + +}