# Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ]; # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "ne003"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Enable networking networking.networkmanager.enable = true; # Set your time zone. time.timeZone = "America/New_York"; # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "en_US.UTF-8"; LC_IDENTIFICATION = "en_US.UTF-8"; LC_MEASUREMENT = "en_US.UTF-8"; LC_MONETARY = "en_US.UTF-8"; LC_NAME = "en_US.UTF-8"; LC_NUMERIC = "en_US.UTF-8"; LC_PAPER = "en_US.UTF-8"; LC_TELEPHONE = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8"; }; # Enable the X11 windowing system. # You can disable this if you're only using the Wayland session. services.xserver.enable = true; # Enable the KDE Plasma Desktop Environment. services.displayManager.sddm.enable = true; services.desktopManager.plasma6.enable = true; # Configure keymap in X11 services.xserver.xkb = { layout = "us"; variant = ""; }; # Enable CUPS to print documents. services.printing.enable = true; # Enable sound with pipewire. hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; # If you want to use JACK applications, uncomment this jack.enable = true; # use the example session manager (no others are packaged yet so this is enabled by default, # no need to redefine it in your config for now) #media-session.enable = true; }; # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; ############################################################################################## ## Nvidia support ## ## DRIVERS & SYSTEM zramSwap.enable = false; # problematic swapDevices = [{ device = "/var/lib/swapfile"; size = 24*1000; }]; # Enable OpenGL hardware = { graphics = { enable = true; }; enableAllFirmware = true; }; boot.extraModprobeConfig = '' options snd-intel-dspcfg dsp_driver=1 ''; # Load nvidia driver for Xorg and Wayland services.xserver.videoDrivers = ["nvidia"]; hardware.nvidia = { # NVIDIA prime GPU selection prime = { offload = { enable = true; enableOffloadCmd = true; }; intelBusId = "PCI:1:0:0"; nvidiaBusId = "PCI:0:2:0"; }; modesetting.enable = true; powerManagement = { enable = true; finegrained = true; }; open = false; nvidiaSettings = true; package = config.boot.kernelPackages.nvidiaPackages.stable; }; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.user = { isNormalUser = true; description = "user"; extraGroups = [ "networkmanager" "wheel" "audio" "sound" "video" "input" "tty" ]; packages = with pkgs; [ kdePackages.kate # thunderbird ]; }; ############################################################################################## # Enable automatic login for the user. services.xserver.displayManager.autoLogin.enable = true; services.xserver.displayManager.autoLogin.user = "user"; # Install firefox. programs.firefox.enable = true; # Allow unfree packages nixpkgs.config.allowUnfree = true; # Enable Ollama LLM manager services.ollama = { enable = true; acceleration = "cuda"; }; # Enable Firmware Update services.fwupd.enable = true; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget vim librewolf onlyoffice-desktopeditors gimp-with-plugins inkscape-with-extensions #zoom-us git gitui vscode nextcloud-client pcsclite alpaca btop appimage-run # blender # kdenlive #vlc ]; # Enable flatpak services.flatpak.enable = true; ###################################################################################### # To Enable Virtualization # Enable libvirtd for managing virtual machines virtualisation.libvirtd.enable = true; # Enable virt-manager, the graphical user interface programs.virt-manager.enable = true; # Add the current user to the libvirtd group for access # users.users.username.extraGroups = [ "libvirtd" ]; users.groups.libvirtd.members = ["user"]; # Configure QEMU (optional) virtualisation.libvirtd.qemu.vhostUserPackages = with pkgs; [ virtiofsd ]; # Enable services for QEMU guests (optional) services.qemuGuest.enable = true; services.spice-vdagentd.enable = true; # Enable copy and paste virtualisation.spiceUSBRedirection.enable = true; ###################################################################################### # Enable pam # security.pam.u2f = { # enable = true; # settings = { # interactive = true; # cue = true; # }; # }; # security.pam.services = { # login.u2fAuth = true; # sudo.u2fAuth = true; # }; # security.pam.yubico = { # enable = true; # debug = true; # mode = "challenge-response"; # id = [ "33722643" ]; #### Change for each yubikey, set for demo ki # }; # services.pcscd.enable = true; # Locking the screen when a Yubikey is unplugged # services.udev.extraRules = '' # ACTION=="remove",\ # ENV{ID_BUS}=="usb",\ # ENV{ID_MODEL_ID}=="0407",\ # ENV{ID_VENDOR_ID}=="1050",\ # ENV{ID_VENDOR}=="Yubico",\ # RUN+="${pkgs.systemd}/bin/loginctl lock-sessions" # ''; ###################################################################################### # Enable pam for "user" #security.pam.u2f.settings = { # origin = "pam://yubi"; # authfile = pkgs.writeText "u2f-mappings" ( # username:KOQnz9gjYOETURdkWlK08ZHWQC/nS1zpJ8Ue8NhAojq93u85VsdGlUwEHrbVC4UD72PkLxlxu8W/zvH+htbe5g==,+6sZEp6pJ2xvC5+Bf4vImf3AfanY04M3UJ6lIdkz6vv5YZWSCqbaNtmtYnLB/9sQX3CfgwPHUVnWOx8yoF8/og==,es256,+presence # ":,,," # ); # }; # services = { # pcscd.enable = true; # udev.packages = [ pkgs.yubikey-personalization ]; # }; ###################################################################################### # security.pam.u2f = { # origin = "pam://nixos"; # authFile = pkgs.writeText "u2f-mappings" (lib.concatStrings [ # user # ":EX33RpQfJfL424vAnY5vBu4T1wZpHl9cg6UhIRIpmPGoGagAaVxWlVyIxiCGvQltJaVqvDvOmw7Oto19uYEE1QDGd4mwmUTYNljg58jVTbF6slBvwSWFXkolpi7Opshk,59PIz9PuXnrJT9/OGX0XPKmeEpkhyFlruiKGeCgYl4NEhCXrkPhaMQ6un87MKkFtM5V1Qu0eTme863zOg97NAQ==,es256,+presence" #":,,," # ]); # }; # security.pam.services = { # login.u2fAuth = true; # sudo.u2fAuth = true; # }; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; # programs.gnupg.agent = { # enable = true; # enableSSHSupport = true; # }; # List services that you want to enable: # Enable the OpenSSH daemon. # services.openssh.enable = true; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "24.11"; # Did you read the comment? }