{ config, pkgs, ... }:

let
  unstableTarball =
    fetchTarball
      https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz;
in
{
  imports =
    [ # Include the results of the hardware scan.
      /etc/nixos/hardware-configuration.nix
    ];

  nixpkgs.config = {
    packageOverrides = pkgs: {
      unstable = import unstableTarball {
        config = config.nixpkgs.config;
      };
    };
  };

  # Allow unfree packages
  nixpkgs.config = {
    allowUnfree = true;
    permittedInsecurePackages = [ ];
  };

  # Enable Fonts
  fonts = {
    fontDir.enable = true;
    enableGhostscriptFonts = true;
    packages = with pkgs; [ 
      corefonts
      terminus_font
      ubuntu_font_family
      liberation_ttf
      dejavu_fonts
    ];
  };

  # Enable Java
  programs.java = {
    enable = true;
    package = pkgs.jdk11;
  };

  environment.systemPackages = with pkgs; [
    # ---------------------------------------------------------------------
    # Core Pakages
    # ---------------------------------------------------------------------
    # ansible		  # Radically simple IT automation    
    curl                  # A command line tool for transferring files with URL syntax
    dnsutils              # Domain name server
    diffutils             # Commands for showing the differences between files (diff, cmp, etc.)
    mc                    # File Manager and User Shell for the GNU Project
    htop                  # An interactive process viewer
    rsync                 # Fast incremental file transfer utility
    wget                  # Tool for retrieving files using HTTP, HTTPS, and FTP
    nettools              # A set of tools for controlling the network subsystem
    ncdu                  # Disk usage analyzer with an ncurses interface
    # nfs-utils             # Linux user-space NFS utilities
    pciutils              # inspecting and manipulating configuration of PCI devices
    pwgen                 # Password generator
    # pwgen-secure          # Secure password generation library to replace pwgen
    renameutils           # A set of programs to make renaming of files faster
    rename                # Rename files according to a Perl rewrite expression
    smartmontools	      # Tools for monitoring the health of hard drives
    imagemagick           # A software suite to create, edit, compose, or convert bitmap images
    lshw                  # Provide detailed information on the hardware configuration
    lsof                  # A tool to list open files
    unrar                 # Utility for RAR archives
    unzip                 # An extraction utility for archives compressed
    zip                   # Compressor/archiver for creating and modifying zipfiles
    p7zip                 # A new p7zip fork with additional codecs

    # ---------------------------------------------------------------------
    # Accessories
    # ---------------------------------------------------------------------
    authenticator           # Two-factor authentication code generator for GNOME
    bleachbit               # A program to clean your computer
    # czkawka                 # A simple, fast and easy to use app to remove unnecessary files
    bitwarden               # bitwarden-desktop
    # deja-dup              # A simple backup tool
    # gnome-decoder           # Scan and Generate QR Codes
    # gnome-obfuscate         # Censor private information
    # gnome-maps              # A map application for GNOME 3
    # unstable.gpt4all        # A free-to-use, locally running, privacy-aware chatbot. No GPU or internet required
    # fsearch                 # A fast file search utility for Unix-like systems based on GTK+3
    cherrytree              # An hierarchical note taking application
    # caffeine-ng             # Status bar application to temporarily inhibit screensaver and sleep mode
    doublecmd               # Two-panel graphical file manager written in Pascal
    freefilesync            # Open Source File Synchronization & Backup Software
    shutter                 # Screenshot and annotation tool
    gparted                 # Graphical disk partitioning tool
    ulauncher               # A fast application launcher for Linux
    # synapse                 # Semantic launcher to start applications and find relevant files
    # pika-backup             # Simple backups based on borg
    owncloud-client         # Synchronise your ownCloud
    keepassxc               # Offline password manager
    # veracrypt               # Free Open-Source filesystem on-the-fly encryption

    # ---------------------------------------------------------------------
    # Andriod software
    # ---------------------------------------------------------------------
    # android-file-transfer    # Reliable MTP client with minimalistic UI provides: aft-mtp-cli android-file-transfer aft-mtp-mount
    # android-tools            # Android SDK platform tools
    # waydroid                 # Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system

    # ---------------------------------------------------------------------
    # Codec
    # ---------------------------------------------------------------------
    # ffmpeg_5-full           # A complete, cross-platform solution to record, convert and stream audio and video
    # ffmpeg_7-full           # A complete, cross-platform solution to record, convert and stream audio and video
    ffmpegthumbnailer       # A lightweight video thumbnailer
    gst_all_1.gst-vaapi
    gst_all_1.gst-libav
    gst_all_1.gst-plugins-bad
    gst_all_1.gst-plugins-ugly
    gst_all_1.gst-plugins-good
    gst_all_1.gst-plugins-base
    lame                    # A high quality MPEG Audio Layer III (MP3) encoder
    wavpack                 # Hybrid audio compression format
    x264                    # Library for encoding H264/AVC video streams
    x265                    # Library for encoding H.265/HEVC video streams
    mpg123                  # Fast console MPEG Audio Player and decoder library

    #-----------------------------------------------------------------  
    # DVD / Bluray
    #-----------------------------------------------------------------
    # asunder               # A graphical Audio CD ripper and encoder for Linux
    # libbluray             # Library to access Blu-Ray disks for video playback
    # libaacs               # Library to access AACS protected Blu-Ray disks
    # libdvdcss             # A library for decrypting DVDs
    # libisofs              # A library to create an ISO-9660 filesystem with extensions like RockRidge or Joliet
    # libburn               # A library by which preformatted data get onto optical media: CD, DVD, BD (Blu-Ray)
    # xfce.xfburn           # Disc burner and project creator for Xfce

    #-----------------------------------------------------------------  
    # Emulatoren
    #-----------------------------------------------------------------
    # ppsspp-qt               # Playstation Portable emulator
    # pcsx2                   # Playstation 2 emulator

    # ---------------------------------------------------------------------
    # Graphics
    # ---------------------------------------------------------------------
    simple-scan             # Simple scanning utility
    # gimp-with-plugins       # The GNU Image Manipulation Program
    pinta                   # Drawing/editing program modeled after Paint.NET
    # shotwell                # Popular photo organizer for the GNOME desktop

    #-----------------------------------------------------------------  
    # Gaming
    #-----------------------------------------------------------------
    mangohud                # A Vulkan and OpenGL overlay for monitoring FPS
    goverlay                # Graphical UI to help manage Linux overlays
    # heroic                  # A Native GOG, Epic, and Amazon Games Launcher         
    # protonup-ng             # CLI program and API to automate the installation and update Proton-GE
    # protonup-qt             # manage Proton-GE and Luxtorpeda for Steam and Wine-GE
    xboxdrv                 # Xbox/Xbox360 gamepad driver

    #-----------------------------------------------------------------  
    # Tools
    #-----------------------------------------------------------------
    # gpu-viewer              # A front-end to glxinfo, vulkaninfo, clinfo and es2_info
    # cpu-x                   # Software that gathers information on CPU, motherboard and more

    #-----------------------------------------------------------------  
    # Internet
    #-----------------------------------------------------------------
    angryipscanner           # fast and friendly network scanner
    brave                    # Brave Browser
    freetube                 # An Open Source YouTube app for privacy
    filezilla                # Graphical FTP, FTPS and SFTP client
    # protonvpn-gui            # Proton VPN GTK app
    # signal-desktop           # Private, simple, and secure messenger
    tdesktop                 # Telegram Desktop
    tor-browser              # Tor Browser
    # qtox                     # Qt Tox client
    # remmina                  # Remote desktop client written in GTK
    mumble                   # Low-latency, high quality voice chat software
    # liferea                  # A GTK-based news feed aggregator
    # uget                     # Download manager using GTK and libcurl
    # vivaldi                  # Browser for our Friends, powerful and personal
    # vivaldi-ffmpeg-codecs    # Additional support for proprietary codecs for Vivaldi

    #-----------------------------------------------------------------  
    # Office
    #-----------------------------------------------------------------
    evolution               # application that provides integrated mail, calendaring and address book
    # gscan2pdf               # GUI to produce PDFs or DjVus from scanned documents
    foliate                 # A simple and modern GTK eBook reader
    # paperwork               # personal document manager for scanned documents
    pdfarranger             # Merge or split pdf documents and rotate, crop and rearrange their pages 
    # onlyoffice-bin_latest   # Office suite that combines text, spreadsheet and presentation editors allowing to create
    libreoffice-fresh       # Comprehensive, professional-quality productivity suite, a variant of openoffice.org
    # qownnotes               # Plain-text file notepad and todo-list manager with markdown support and Nextcloud/ownCloud integration
    # joplin-desktop          # An open source note taking and to-do application with synchronisation capabilities
    # trilium-desktop         # Hierarchical note taking application with focus on building large personal knowledge bases
    # xournalpp               # Xournal++ is a handwriting Notetaking software with PDF annotation support

    # ---------------------------------------------------------------------
    # Programming
    # ---------------------------------------------------------------------
    git                     # Distributed version control system
    # diffuse                 # Graphical tool for merging and comparing text files
    meld                    # Visual diff and merge tool
    vscodium                # Open source source code editor developed by Microsoft

    # ---------------------------------------------------------------------
    # Themes
    # ---------------------------------------------------------------------
    arc-theme                 # Flat theme with transparent elements for GTK 3, GTK 2 and Gnome Shell
    papirus-icon-theme        # Pixel perfect icon theme for Linux
    numix-cursor-theme        # Numix cursor theme

    #-----------------------------------------------------------------  
    # Multimedia
    #-----------------------------------------------------------------
    audacious               # A lightweight and versatile audio player
    audacious-plugins       # Plugins for Audacious music player
    # easytag                 # View and edit tags for various audio files
    # mediainfo-gui           # Supplies technical and tag information about a video or audio file
    # soundconverter          # Leading audio file converter for the GNOME Desktop
    # strawberry		      # Music player and music collection organizer
    # obs-studio              # Free and open source software for video recording and live streaming
    # guvcview                # A simple interface for devices supported by the linux UVC driver
    # kazam                   # A screencasting program created with design in mind
    # video-trimmer           # Trim videos quickly
    # radiotray-ng            # An internet radio player
    # jellyfin-media-player   # Jellyfin Desktop Client based on Plex Media Player
    vlc                     # Cross-platform media player and streaming server

    # ---------------------------------------------------------------------
    # NIX-Tools
    # ---------------------------------------------------------------------
    niv                       # Nix dependency management
    nix-bash-completions      # Bash completions for Nix, NixOS, and NixOps
    nix-index                 # A files database for nixpkgs
    nix-prefetch-git          # nix-prefetch-git
    # nixos-generators          # Collection of image builders

    # ---------------------------------------------------------------------
    # Spell checker
    # ---------------------------------------------------------------------
    aspell                  # Spell checker for many languages
    aspellDicts.de          # Aspell dictionary for German
    hunspell                # Spell checker
    hunspellDicts.de-de     # Hunspell dictionary for German
    hyphen                  # A text hyphenation library
    # languagetool            # A proofreading program for English, German ...

    # ---------------------------------------------------------------------
    # Openvpn
    # ---------------------------------------------------------------------
    #openvpn             # A robust and highly flexible tunneling application
    #networkmanager-openvpn
    #gnome.networkmanager-openvpn

    # ---------------------------------------------------------------------
    # Library
    # ---------------------------------------------------------------------
    # libwacom            # Libraries, configuration, and diagnostic tools for Wacom tablets
  ];

}