275 lines
		
	
	
	
		
			5.3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			275 lines
		
	
	
	
		
			5.3 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
{
 | 
						|
  pkgs,
 | 
						|
  inputs,
 | 
						|
  config,
 | 
						|
  system,
 | 
						|
  ...
 | 
						|
}:
 | 
						|
 | 
						|
with pkgs;
 | 
						|
let
 | 
						|
  cfg = config.schmittlauch.packages;
 | 
						|
  unstable = inputs.nixos-unstable.legacyPackages.${system};
 | 
						|
  nur = inputs.nur.legacyPackages.${system};
 | 
						|
 | 
						|
  graphicsApps =
 | 
						|
    [
 | 
						|
      inkscape
 | 
						|
      darktable
 | 
						|
      exiftool
 | 
						|
    ]
 | 
						|
    ++ (with gimp3Plugins; [
 | 
						|
      #fourier  # broken
 | 
						|
      #lqrPlugin  # broken
 | 
						|
    ])
 | 
						|
    ++ lib.optionals pkgs.stdenv.isLinux [
 | 
						|
      gimp3
 | 
						|
      hugin
 | 
						|
      #luminanceHDR  # FIXME, build failure
 | 
						|
      xournalpp
 | 
						|
    ]
 | 
						|
    ++ lib.optionals pkgs.stdenv.isLinux [
 | 
						|
      gimp
 | 
						|
    ];
 | 
						|
 | 
						|
  multimediaApps =
 | 
						|
    [
 | 
						|
      mpv
 | 
						|
      yt-dlp
 | 
						|
    ]
 | 
						|
    ++ lib.optionals pkgs.stdenv.isLinux [
 | 
						|
      vlc
 | 
						|
      amarok
 | 
						|
      clementine
 | 
						|
      kdePackages.elisa
 | 
						|
      musescore
 | 
						|
      tenacity
 | 
						|
      soundkonverter
 | 
						|
      #nur.repos.fooker.studio-link
 | 
						|
    ];
 | 
						|
 | 
						|
  cliApps =
 | 
						|
    [
 | 
						|
      coreutils
 | 
						|
      myVim
 | 
						|
      htop
 | 
						|
      tmux
 | 
						|
      httpie
 | 
						|
      ponysay
 | 
						|
      gti
 | 
						|
      tree
 | 
						|
      lsof
 | 
						|
      mosh
 | 
						|
      openssh
 | 
						|
      sshfs-fuse
 | 
						|
      sshuttle
 | 
						|
      cryfs
 | 
						|
      thefuck
 | 
						|
      gnupg
 | 
						|
      unar
 | 
						|
      lzop
 | 
						|
      p7zip
 | 
						|
      pwgen
 | 
						|
      pandoc
 | 
						|
      pdfgrep
 | 
						|
      # zig dependency breaks occasionally, stay on C version for now
 | 
						|
      ncdu_1
 | 
						|
      dos2unix
 | 
						|
      unzip
 | 
						|
      fswatch
 | 
						|
      jq
 | 
						|
      age
 | 
						|
      lnav
 | 
						|
      spacer
 | 
						|
 | 
						|
      nix-output-monitor # putting this here as a plain `nix` alternative
 | 
						|
    ]
 | 
						|
    ++ lib.optionals pkgs.stdenv.isLinux [
 | 
						|
      xclip
 | 
						|
      smbnetfs # for FUSE smb mounting
 | 
						|
      psmisc # for killall
 | 
						|
      torsocks
 | 
						|
      agrep
 | 
						|
      reptyr # re-bind running program to other tty
 | 
						|
    ];
 | 
						|
 | 
						|
  nixHelpers = [
 | 
						|
    nixpkgs-review
 | 
						|
    nixfmt-rfc-style
 | 
						|
    nix-top
 | 
						|
    statix
 | 
						|
  ];
 | 
						|
  devTools =
 | 
						|
    [
 | 
						|
      curl
 | 
						|
      httpie
 | 
						|
      gcc
 | 
						|
      shellcheck
 | 
						|
      mtr
 | 
						|
      ripgrep
 | 
						|
      fd
 | 
						|
      gitui
 | 
						|
      pre-commit
 | 
						|
      scriv
 | 
						|
 | 
						|
      # Haskell
 | 
						|
      ghc
 | 
						|
      cabal2nix
 | 
						|
    ]
 | 
						|
    ++ lib.optionals pkgs.stdenv.isLinux [
 | 
						|
      gdb
 | 
						|
      strace
 | 
						|
      ltrace
 | 
						|
      valgrind
 | 
						|
      zeal
 | 
						|
    ];
 | 
						|
 | 
						|
  pythonTools = with python3Packages; [
 | 
						|
    python # to shadow old macOS python
 | 
						|
    ipython
 | 
						|
    uv
 | 
						|
    pip
 | 
						|
    numpy
 | 
						|
    matplotlib
 | 
						|
    jedi
 | 
						|
    jedi-language-server
 | 
						|
    black
 | 
						|
    flake8
 | 
						|
    mypy
 | 
						|
  ];
 | 
						|
 | 
						|
  games = [
 | 
						|
    superTuxKart
 | 
						|
    #hedgewars
 | 
						|
  ];
 | 
						|
 | 
						|
  desktopCommon = [
 | 
						|
    keepassxc
 | 
						|
  ];
 | 
						|
 | 
						|
  desktopLinux = [
 | 
						|
    firefox
 | 
						|
    chromium
 | 
						|
    kdePackages.falkon
 | 
						|
    thunderbird
 | 
						|
    calibre
 | 
						|
    dino
 | 
						|
    zotero
 | 
						|
    ding
 | 
						|
    aspell
 | 
						|
    aspellDicts.de
 | 
						|
    aspellDicts.en
 | 
						|
    # for kate/KDE applications
 | 
						|
    hunspellDicts.de-de
 | 
						|
    hunspellDicts.en-us
 | 
						|
    hunspellDicts.en-gb-ise
 | 
						|
    seafile-client
 | 
						|
    alacritty
 | 
						|
    libreoffice-qt6 # still with KDE integration
 | 
						|
    backintime-common
 | 
						|
    anki
 | 
						|
    signal-desktop
 | 
						|
    (tor-browser-bundle-bin.override {
 | 
						|
      mediaSupport = true;
 | 
						|
      pulseaudioSupport = pkgs.stdenv.isLinux;
 | 
						|
    })
 | 
						|
    tigervnc
 | 
						|
    pdfpc
 | 
						|
    nheko
 | 
						|
    gpxsee
 | 
						|
    subsurface
 | 
						|
    yate
 | 
						|
    # split and merge PDFs in a GUI
 | 
						|
    pdfarranger
 | 
						|
    qbittorrent
 | 
						|
    #(pkgs.pidgin-with-plugins.override {
 | 
						|
    #    plugins = [ pkgs.pidginotr ];})
 | 
						|
 | 
						|
    logseq
 | 
						|
 | 
						|
    # for Hibiscus banking software
 | 
						|
    jameica
 | 
						|
    #ToDo: which of these drivers is actually used?
 | 
						|
    geckodriver
 | 
						|
    chromedriver
 | 
						|
  ];
 | 
						|
 | 
						|
  kdeTools =
 | 
						|
    [
 | 
						|
      okteta
 | 
						|
      plasma5Packages.kdeconnect-kde
 | 
						|
    ]
 | 
						|
    ++ (with kdePackages; [
 | 
						|
      okular
 | 
						|
      gwenview
 | 
						|
      yakuake
 | 
						|
      dolphin
 | 
						|
      spectacle
 | 
						|
      kate
 | 
						|
      kleopatra
 | 
						|
      qdirstat
 | 
						|
      ark
 | 
						|
      kwalletmanager
 | 
						|
      #ktouch  # TODO: unbreak
 | 
						|
      kcharselect
 | 
						|
      konversation
 | 
						|
      krdc
 | 
						|
      skanlite
 | 
						|
      akonadiconsole
 | 
						|
      tokodon # mastodon client
 | 
						|
      networkmanager-qt
 | 
						|
      kcrash
 | 
						|
      breeze-gtk
 | 
						|
    ]);
 | 
						|
in
 | 
						|
{
 | 
						|
  options.schmittlauch.packages = {
 | 
						|
    graphics = lib.mkEnableOption "Enable a common set of graphics apps";
 | 
						|
    multimedia = lib.mkEnableOption "Enable a common set of multimedia apps";
 | 
						|
    cli = lib.mkOption {
 | 
						|
      description = "Enable a common set of CLI tools";
 | 
						|
      type = lib.types.bool;
 | 
						|
      default = true;
 | 
						|
    };
 | 
						|
    nixHelpers = lib.mkEnableOption "Enable a common set of Nix helper tools";
 | 
						|
    devTools = lib.mkEnableOption "Enable a common set of dev tools";
 | 
						|
    pythonTools = lib.mkEnableOption "Enable a common set of python tools";
 | 
						|
    games = lib.mkEnableOption "Enable some games";
 | 
						|
    desktopCommon = lib.mkOption {
 | 
						|
      description = "GUI desktop applications that work cross-platform and cross-desktop";
 | 
						|
      type = lib.types.bool;
 | 
						|
      default = true;
 | 
						|
    };
 | 
						|
    desktopLinux = lib.mkEnableOption "Enable a common set of desktop applications";
 | 
						|
    kde = lib.mkEnableOption "Enable a common set of KDE applications";
 | 
						|
  };
 | 
						|
  config = {
 | 
						|
    home.packages = lib.flatten (
 | 
						|
      (lib.optional cfg.graphics graphicsApps)
 | 
						|
      ++ (lib.optional cfg.multimedia multimediaApps)
 | 
						|
      ++ (lib.optional cfg.cli cliApps)
 | 
						|
      ++ (lib.optional cfg.nixHelpers nixHelpers)
 | 
						|
      ++ (lib.optional cfg.devTools devTools)
 | 
						|
      ++ (lib.optional cfg.pythonTools pythonTools)
 | 
						|
      ++ (lib.optional cfg.games games)
 | 
						|
      ++ (lib.optional cfg.desktopCommon desktopCommon)
 | 
						|
      ++ (lib.optional cfg.desktopLinux desktopLinux)
 | 
						|
      ++ (lib.optional cfg.kde kdeTools)
 | 
						|
    );
 | 
						|
 | 
						|
    nixpkgs.overlays = import ../overlays.nix;
 | 
						|
    nixpkgs.config = {
 | 
						|
 | 
						|
      permittedInsecurePackages = [
 | 
						|
        # (temporarily) permit the usage of libolm
 | 
						|
        "olm-3.2.16"
 | 
						|
      ];
 | 
						|
      clementine.spotify = false;
 | 
						|
      vim = {
 | 
						|
        gui = "gtk3";
 | 
						|
        python = true;
 | 
						|
        multibyteSupport = true;
 | 
						|
      };
 | 
						|
    };
 | 
						|
  };
 | 
						|
}
 |