# 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/sda"; boot.loader.grub.useOSProber = true; boot.postBootCommands = '' # Commands here will run after the system has booted but before the login prompt echo "Running command after boot..." # Example: Set a system property #sh /mnt/mine/create_macvtap.sh ip link add link enp0s25 name 1p-d13 type macvtap mode bridge ip link add link enp0s25 name 1p-d13-2 type macvtap mode bridge ip link add link enp0s25 name 1p-d13-3 type macvtap mode bridge ip link add link enp0s25 name 1p-d13-4 type macvtap mode bridge ''; networking.hostName = "ne007"; # 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; ############################################################################################## #services.xserver.enable = true; services.xserver.enable = true; services.xserver.displayManager.sddm.enable = true; services.xserver.desktopManager.plasma6.enable = true; # Configure keymap in X11 services.xserver.xkb.layout = "us"; services.xserver.xkb.variant = ""; # Enable automatic login for the user. services.xserver.displayManager.autoLogin.enable = false; services.xserver.displayManager.autoLogin.user = "user"; # Enable xrdp services services.xrdp.defaultWindowManager = "startplasma-x11"; services.xrdp.enable = true; services.xrdp.openFirewall = true; ######################################################################################################### # Enable CUPS to print documents. services.printing.enable = true; # Enable sound with pipewire. services.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; ############################################################################################## # Enable Firmware Update services.fwupd.enable = true; ############################################################################################## # SECURITY : doas to replace sudo security.doas.enable = true; security.doas.extraRules = [{ groups = [ "wheel" ]; persist = true; keepEnv = true; }]; security.sudo.enable = false; security.sudo.execWheelOnly = true; ############################################################################################## # Install firefox. programs.firefox = { enable = true; package = pkgs.librewolf; policies = { DisableTelemetry = true; DisableFirefoxStudies = true; Preferences = { "cookiebanners.service.mode.privateBrowsing" = 2; # Block cookie banners in private browsing "cookiebanners.service.mode" = 2; # Block cookie banners "privacy.donottrackheader.enabled" = true; "privacy.fingerprintingProtection" = true; "privacy.resistFingerprinting" = true; "privacy.trackingprotection.emailtracking.enabled" = true; "privacy.trackingprotection.enabled" = true; "privacy.trackingprotection.fingerprinting.enabled" = true; "privacy.trackingprotection.socialtracking.enabled" = true; }; ExtensionSettings = { "jid1-ZAdIEUB7XOzOJw@jetpack" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/duckduckgo-for-firefox/latest.xpi"; installation_mode = "force_installed"; }; "uBlock0@raymondhill.net" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; installation_mode = "force_installed"; }; }; }; }; # 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 kdePackages.discover # Optional: Install if you use Flatpak or fwupd firmware update sevice kdePackages.kcalc # Calculator kdePackages.kcharselect # Tool to select and copy special characters from all installed fonts kdePackages.kcolorchooser # A small utility to select a color kdePackages.kolourpaint # Easy-to-use paint program kdePackages.ksystemlog # KDE SystemLog Application kdePackages.sddm-kcm # Configuration module for SDDM kdiff3 # Compares and merges 2 or 3 files or directories hardinfo2 # System information and benchmarks for Linux systems haruna # Open source video player built with Qt/QML and libmpv xclip # Tool to access the X clipboard from a console application ]; ############################################################################################## # Enable flatpak services.flatpak.enable = true; # must add to install_flatpaks.sh "https://github.com/nargacu83/nixos/blob/main/install-flatpaks.sh" # flatpak --user override --filesystem=$HOME/.local/share/fonts:ro; # flatpak --user override --filesystem=$HOME/.icons:ro; # flatpak --user override --filesystem=/nix/store:ro; ###################################################################################### # 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; # 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? }