{ config, pkgs, ... }: { networking.hostName = "loki-nixos"; imports = [ ../../nixos/custom.nix ./hardware-configuration.nix ]; fileSystems."/".options = [ "ssd" "noatime" "compress=zstd" ]; swapDevices = [{ device = "/swapfile"; size = 16 * 1024; randomEncryption.enable = true; }]; boot.resumeDevice = "/dev/nvme0n1p2"; # -- tmp -- # No display manager / X11 required services.xserver.enable = false; services.displayManager.gdm.enable = false; # Hyprland (NixOS module sets up the usual system bits like portals/polkit/etc.) # programs.hyprland = { # enable = true; # xwayland.enable = true; # # Recommended on NixOS for systemd-managed sessions (optional, but nice): # withUWSM = true; # }; # A terminal for the default Hyprland config (you can pick another) # environment.systemPackages = with pkgs; [ # kitty # ]; # Auto-login on tty1 services.getty.autologinUser = "krosh"; # Optional: only do the autologin once per boot services.getty.autologinOnce = true; # Start Hyprland immediately after the tty1 autologin. # Choose ONE of the blocks below depending on your shell. ## If you log in with zsh: programs.zsh.enable = true; programs.zsh.loginShellInit = '' if [ "$(tty)" = "/dev/tty1" ] && [ -z "$WAYLAND_DISPLAY" ] && [ -z "$DISPLAY" ] && [ -z "$SSH_CONNECTION" ]; then # If using UWSM: #if command -v uwsm >/dev/null 2>&1 && uwsm check may-start; then # exec uwsm start hyprland.desktop #fi # Fallback (no UWSM): exec Hyprland 2>/dev/null 1>&2 fi ''; ## If you log in with bash instead, use this (and remove the zsh block): # programs.bash.loginShellInit = '' # if [ "$(tty)" = "/dev/tty1" ] && [ -z "$WAYLAND_DISPLAY" ] && [ -z "$DISPLAY" ] && [ -z "$SSH_CONNECTION" ]; then # if command -v uwsm >/dev/null 2>&1 && uwsm check may-start; then # exec uwsm start hyprland.desktop # fi # exec Hyprland # fi # ''; # systemd.services.getty."tty1".exec = # [ "/bin/login" "-f" "krosh" "--" "${pkgs.hyprland}/bin/Hyprland" ]; # --- Temp sections for testing purposes --- # services.pipewire = { # enable = true; # alsa.enable = true; # pulse.enable = true; # alsa.support32Bit = true; # }; # environment.systemPackages = with pkgs; [ # pavucontrol # qpwgraph # paprefs # helvum # ]; # programs.dconf.enable = true; }