From 9d9a349b6528abc321347750c8d687a12b4bbb77 Mon Sep 17 00:00:00 2001 From: Arne Keller Date: Tue, 6 Apr 2021 17:35:09 +0200 Subject: [PATCH] Update NixOS config --- .config/configuration.nix | 107 ++++++++++++++++++++++++-------------- 1 file changed, 68 insertions(+), 39 deletions(-) diff --git a/.config/configuration.nix b/.config/configuration.nix index 24ff6e8..8e9f83b 100644 --- a/.config/configuration.nix +++ b/.config/configuration.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: let - my-python-packages = python-packages: with python-packages; [ + my-python3-packages = python3-packages: with python3-packages; [ pip setuptools z3 requests @@ -12,17 +12,18 @@ let markdown psutil ]; - my-python2-packages = python2-packages: with python2-packages; [ - pip setuptools - cython - pygame - numpy - pillow - pyopengl - pyopengl-accelerate - ]; - python-with-my-packages = pkgs.python3.withPackages my-python-packages; - python2-with-my-packages = pkgs.python2.withPackages my-python2-packages; + #my-python2-packages = python2-packages: with python2-packages; [ + # pip setuptools + # cython + # pygame + # numpy + # pillow + # pyopengl + # pyopengl-accelerate + #]; + python3-with-my-packages = pkgs.python3.withPackages my-python3-packages; + #python2-with-my-packages = pkgs.python2.withPackages my-python2-packages; + linuxPackages = pkgs.linuxPackages_5_10; in { imports = @@ -33,7 +34,7 @@ in # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - boot.kernelPackages = pkgs.linuxPackages_5_10; + boot.kernelPackages = linuxPackages; boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; boot.kernelModules = [ "v4l2loopback" ]; boot.kernelParams = [ "mitigations=off" ]; @@ -65,7 +66,15 @@ in networking.firewall.logRefusedConnections = false; networking.firewall.rejectPackets = true; networking.firewall.allowedTCPPorts = [ 12783 12975 25565 ]; + networking.firewall.allowedTCPPortRanges = [ + # KDE Connect + { from = 1714; to = 1764; } + ]; networking.firewall.allowedUDPPorts = [ 12975 ]; + networking.firewall.allowedUDPPortRanges = [ + # KDE Connect + { from = 1714; to = 1764; } + ]; # Or disable the firewall altogether. #networking.firewall.enable = false; @@ -84,14 +93,14 @@ in XDG_CACHE_HOME = "$HOME/.cache"; XDG_DATA_HOME = "$HOME/.local/share"; - KDEHOME = "/home/arne/.config/kde"; - KDESYCOCA = "/home/arne/.cache/kdesycoca"; + KDEHOME = "$HOME/.config/kde"; + KDESYCOCA = "$HOME/.cache/kdesycoca"; KDE_HOME_READONLY = "1"; KDE_UTF8_FILENAMES = "1"; - ANDROID_SDK_HOME = "/home/arne/.cache"; - GRADLE_USER_HOME = "/home/arne/.cache/gradle"; - MATHEMATICA_USERBASE = "/home/arne/.cache/mathematica"; - XCOMPOSECACHE = "/home/arne/.cache/X11/xcompose"; + ANDROID_SDK_HOME = "$HOME/.cache"; + GRADLE_USER_HOME = "$HOME/.cache/gradle"; + MATHEMATICA_USERBASE = "$HOME/.cache/mathematica"; + XCOMPOSECACHE = "$HOME/.cache/X11/xcompose"; }; environment.extraInit = '' export XAUTHORITY=/tmp/Xauthority @@ -129,6 +138,10 @@ in liberation_ttf ]; + virtualisation.docker.enable = true; + virtualisation.docker.logDriver = "journald"; + #virtualisation.anbox.enable = true; + # services.printing.enable = true; services.boinc.enable = true; services.vnstat.enable = true; @@ -184,9 +197,12 @@ in "mathematica" "idea-ultimate" "android-studio-stable" - "logmein-hamachi" + #"logmein-hamachi" ]; packageOverrides = super: let self = super.pkgs; in { + maven = super.maven.override { + jdk = super.pkgs.jdk11; + }; # remove tesseract and ImageMagick ripgrep-all = super.ripgrep-all.overrideDerivation (attrs: { postInstall = '' @@ -195,9 +211,25 @@ in ''; doInstallCheck = false; }); + qbittorrent = super.qbittorrent.overrideAttrs (attrs: rec { + version = "4.3.4.1"; + src = pkgs.fetchFromGitHub { + owner = "qbittorrent"; + repo = "qbittorrent"; + rev = "release-4.3.4.1"; # TODO: is there some reason this also has to be specified? + sha256 = "0hpv99ky077h5rvxxd76l5xv99ivqa1hq6739jp1gvl4w6w3cbgc"; + }; + }); + # remove openssl + #rustup = super.rustup.overrideAttrs (attrs: rec { + # buildInputs = [ super.pkgs.zlib ]; + # # this does not actually work due to #103130 + # cargoBuildFlags = [ "--no-default-features" "--features" "no-self-update" "reqwest-backend" "reqwest-rustls-tls" ]; + # doCheck = false; + #}); }; }; - # programs.steam.enable = true; + programs.steam.enable = true; programs.zsh.enable = true; programs.zsh.enableGlobalCompInit = false; programs.adb.enable = true; @@ -232,14 +264,15 @@ in # programming environments geckodriver - python2-with-my-packages - python-with-my-packages - jdk14 maven visualvm + #python2-with-my-packages + python3-with-my-packages + jdk11 maven visualvm rustup jupyter vscodium jetbrains.idea-ultimate - androidStudioPackages.stable + #androidStudioPackages.stable + nodejs # CLI applications lynx @@ -250,6 +283,10 @@ in gallery-dl youtube-dl plantuml + tectonic + docker-compose + qemu + graphviz # GUI applications sqlitebrowser @@ -275,6 +312,8 @@ in plasma-vault ksshaskpass notepadqq + mpv + bitcoin xorg.xkbcomp xorg.xrandr @@ -283,36 +322,26 @@ in xclip ntfs3g cryptsetup pinentry-qt - logmein-hamachi - mpv wineWowPackages.full winetricks cdrkit vnstat aspellDicts.de hunspellDicts.de-de - bitcoin - qemu - docker-compose - update-resolv-conf - texlive.combined.scheme-full - tectonic - linuxPackages_5_10.perf + #texlive.combined.scheme-full + linuxPackages.perf perf-tools smartmontools - nodejs libfaketime afl + # Games multimc minecraft + #logmein-hamachi update-resolv-conf - openssl ]; - virtualisation.docker.enable = true; - virtualisation.docker.logDriver = "journald"; - # 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