# 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 # ./ssh.nix ]; # Bootloader. boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/vda"; boot.loader.grub.useOSProber = true; networking.hostName = "ne009"; # 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"; }; ############################################################################################## # Configure keymap in X11 services.xserver.xkb.layout = "us"; services.xserver.xkb.variant = ""; # Enable automatic login for the user. services.getty.autologinUser = "user"; ############################################################################################## # Enable Firmware Update services.fwupd.enable = true; ############################################################################################## # SECURITY : doas to replace sudo security.doas.enable = true; security.doas.extraRules = [{ groups = [ "wheel" ]; users = [ "user" ]; persist = true; keepEnv = true; }]; security.sudo.enable = false; security.sudo.execWheelOnly = true; ############################################################################################## # Allow unfree packages nixpkgs.config.allowUnfree = 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 git pcsclite # alpaca btop # For L5-Engineering/Devlopers [ NOTE MUST BE USED WITH 'CONTAINIZAZATION' SECTION!!! ] dive # look into docker image layers podman-tui # status of containers in the terminal docker-compose # start group of containers for dev #podman-compose # start group of containers for dev ]; ############################################################################################## ###################################################################################### # 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; ###################################################################################### # To Enable Containerization # Enable common container config files in /etc/containers virtualisation.containers.enable = true; virtualisation = { podman = { enable = true; # Create a `docker` alias for podman, to use it as a drop-in replacement dockerCompat = true; # Required for containers under podman-compose to be able to talk to each other. defaultNetwork.settings.dns_enabled = true; }; }; ############################################################################################## # Define a user account. Don't forget to set a password with ‘passwd’. users.users.user = { isNormalUser = true; description = "user"; extraGroups = [ "networkmanager" "wheel" ]; packages = with pkgs; [ kdePackages.kate # thunderbird ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG6GNWvC4o2MfwCWl7ClIMAL/UncQvJdxigrON0kLTkX" # example ssh -o "IdentitiesOnly=yes" -i id_red_penguin user@192.168.1.251 ]; }; # 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; ############################################################################################## services.openssh.enable = true; services.openssh.ports = [ 22 ]; services.openssh.settings.PasswordAuthentication = true; #set to false only after public key is setup / security key is setup # services.openssh.settings.AllowUsers = null; # Allows all users by default. Can be [ "user1" "user2" ] services.openssh.settings.AllowUsers = null; # Allows ONLY "user" users services.openssh.settings.UseDns = true; services.openssh.settings.X11Forwarding = false; services.openssh.settings.PermitRootLogin = "prohibit-password"; # "yes", "without-password", "prohibit-password", "forced-commands-only", "no" # services.openssh.settings.KbdInteractiveAuthentication = false; # services.openssh.protocol = "2"; # Open ports in the firewall. #networking.firewall.allowedTCPPorts = [ 22 3389 ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false; ########################################################################################## # Enables Caddy services.caddy.enable = true; # services.caddy.package = pkgs.callPackage /etc/caddy/custom-package.nix { }; ########################################################################################## # 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 = "25.05"; # Did you read the comment? }