diff --git a/systems/jeroboam/default.nix b/systems/jeroboam/default.nix index 1510c74..04f9b0f 100644 --- a/systems/jeroboam/default.nix +++ b/systems/jeroboam/default.nix @@ -1,21 +1,113 @@ -programs.hyprland = { + +############################################################# +# =========================================================== +# Rehoboam - LT1 +# Simple, Dev +# =========================================================== +############################################################# + +{ inputs, configLib, ... }: { + imports = [ + #################### Every Host Needs This #################### + ./hardware-configuration.nix + + #################### Hardware Modules #################### + inputs.hardware.nixosModules.common-cpu-amd + inputs.hardware.nixosModules.common-gpu-amd + inputs.hardware.nixosModules.common-pc-ssd + + #################### Disk Layout #################### + inputs.disko.nixosModules.disko + (configLib.relativeToRoot "hosts/common/disks/rehoboam.nix") + { + _module.args = { + disk = "/dev/vda"; + withSwap = false; + }; + } + ] + ++ (map configLib.relativeToRoot [ + #################### Required Configs #################### + (configLib.relativeToRoot "hosts/common/core") + + #################### Host-specific Optional Configs #################### + "hosts/common/optional/services/clamav.nix" # depends on optional/msmtp.nix + "hosts/common/optional/msmtp.nix" # required for emailing clamav alerts + "hosts/common/optional/services/openssh.nix" + + # Desktop + "hosts/common/optional/services/greetd.nix" # display manager + "hosts/common/optional/hyprland.nix" # window manager + + #################### Users to Create #################### + "hosts/common/users/sunzi" + "hosts/common/users/laozi" + + ]); + + # set custom autologin options. see greetd.nix for details + # TODO is there a better spot for this? + autoLogin.enable = true; + autoLogin.username = "laozi"; + + # services.gnome.gnome-keyring.enable = true; + # TODO enable and move to greetd area? may need authentication dir or something? + # services.pam.services.greetd.enableGnomeKeyring = true; + + networking = { + hostName = "sunzi"; + # networkmanager.enable = true; + enableIPv6 = false; + }; + + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + timeout = 3; + }; + initrd = { + systemd.enable = true; # tpm2 unlock requires systemd initrd + luks.devices."cryptroot" = { + allowDiscards = true; + bypassWorkqueues = true; + device = "/dev/nvme0n1p2"; + crypttabExtraOpts = [ "tpm2-device=auto" ]; # tpm2 unlock + }; + }; + }; + + # ================ HYPRLAND =================== # + environment.sessionVariables = { + # hack to get the cursor to become visible + WLR_NO_HARDWARE_CURSORS = "1"; + # WLR_RENDERER_ALLOW_SOFTWARE = "1"; + # WLR_DRM_DEVICES = "1"; + + # Hint electron apps to use wayland + NIXOS_OZONE_WL = "1"; + } + + + programs.hyprland = { enable = true; nvidiaPatches = false; xwayland.enable = true; }; -environment.sessionVariables = { - If # your cursor becomes invisible - WLR_NO_HARDWARE_CURSORS = "1"; - # Hint electron apps to use wayland - NIXOS_OZONE_WL = "1"; -}; - hardware = { - Opengl + # Opengl opengl.enable = true; # Most wayland compositors need this nvidia.modesetting.enable = false; }; + + # Fix to enable VSCode to successfully remote SSH on a client to a NixOS host + # https://nixos.wiki/wiki/Visual_Studio_Code # Remote_SSH + # programs.nix-ld.enable = true; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + system.stateVersion = "24.05"; +} \ No newline at end of file