From 29cfc3750d7032e36f47d0aad8baf6a2b7c2dcfc Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 5 Dec 2020 19:44:41 +0100 Subject: [PATCH] Move most tools to user environment Fixes #1. --- modules/communication.nix | 8 - modules/creative.nix | 13 -- modules/default.nix | 4 - modules/media.nix | 45 ----- modules/office.nix | 18 +- modules/tools.nix | 116 ------------ modules/web.nix | 9 - .../simon/modules/{ankisyncd.nix => anki.nix} | 6 +- users/simon/modules/default.nix | 3 +- users/simon/modules/programs.nix | 173 ++++++++++++++++++ 10 files changed, 181 insertions(+), 214 deletions(-) delete mode 100644 modules/communication.nix delete mode 100644 modules/creative.nix delete mode 100644 modules/media.nix delete mode 100644 modules/web.nix rename users/simon/modules/{ankisyncd.nix => anki.nix} (68%) create mode 100644 users/simon/modules/programs.nix diff --git a/modules/communication.nix b/modules/communication.nix deleted file mode 100644 index 21404ad..0000000 --- a/modules/communication.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, lib, pkgs, ... }: - -lib.mkIf config.sbruder.gui.enable { - environment.systemPackages = with pkgs; [ - (mumble.override { pulseSupport = true; }) # VoIP group chat - claws-mail # email client that looks ugly but just works - ]; -} diff --git a/modules/creative.nix b/modules/creative.nix deleted file mode 100644 index 9c5c3d5..0000000 --- a/modules/creative.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, lib, pkgs, ... }: - -lib.mkIf config.sbruder.gui.enable { - environment.systemPackages = with pkgs; [ - blender # 3d animation - darktable # photo development - gimp - gimpPlugins.gmic # bitmap editor - krita # drawing - openscad # parametric/procedural 3d modelling - inkscape # vector graphics editor - ]; -} diff --git a/modules/default.nix b/modules/default.nix index 561365c..aa3fd56 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -9,9 +9,7 @@ # All modules are imported but non-essential modules are activated by # configuration options imports = [ - ./communication.nix ./cpu - ./creative.nix ./cups.nix ./docker.nix ./fonts.nix @@ -19,7 +17,6 @@ ./grub.nix ./libvirt.nix ./locales.nix - ./media.nix ./network-manager.nix ./office.nix ./prometheus/node_exporter.nix @@ -31,7 +28,6 @@ ./sway.nix ./tools.nix ./udev.nix - ./web.nix ./wireguard ]; diff --git a/modules/media.nix b/modules/media.nix deleted file mode 100644 index 16c44b1..0000000 --- a/modules/media.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ config, pkgs, ... }: - -{ - environment.systemPackages = with pkgs; [ - # Audio - abcde # cd ripper - flac # flac encoder - shntool # split audio with cue - sidplayfp # SID chiptune player - sox # “Swiss Army knife of audio manipulation” - - # Audio + Video - mediainfo # show information about media files - youtube-dl # universal video downloader - - # Images - exiftool # manipulate EXIF meta data - jpegoptim # lossless jpeg optimiser - libwebp # tools for webp image format - optipng # lossless png optimiser - pngcrush - pngquant # lossy png optimisers - - # Literature - mupdf # document (pdf) viewer and tools - ] ++ ( - if config.sbruder.gui.enable then [ - # Audio - audacity # audio editor - picard # musicbrainz tagger - - # Audio + Video - ffmpeg-full # A/V multitool - mkvtoolnix # matroska (de-)muxing - mpv # media player - - # Literature - calibre # ebook library - zathura # plugin based document viewer - ] else [ - # Packages only installed when gui is disabled - mkvtoolnix-cli # matroska (de-)muxing - ] - ); -} diff --git a/modules/office.nix b/modules/office.nix index d1e5164..efbee8f 100644 --- a/modules/office.nix +++ b/modules/office.nix @@ -1,21 +1,5 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: lib.mkIf config.sbruder.gui.enable { - environment.systemPackages = with pkgs; [ - aspellDicts.de - aspellDicts.en - hunspellDicts.de-de - hunspellDicts.en-gb-ise # dictionary - gscan2pdf # scanning tool - jameica # application framework (used for hibiscus online banking) - khal # calendar - khard # address book - libreoffice # office suite - pdfsam-basic # pdf multitool - vdirsyncerStable # dav sync client - xournalpp # notebook - xsane # scanning tool - ]; - hardware.sane.enable = true; } diff --git a/modules/tools.nix b/modules/tools.nix index 804568b..a96f4ff 100644 --- a/modules/tools.nix +++ b/modules/tools.nix @@ -1,120 +1,4 @@ -{ config, lib, pkgs, ... }: - { - environment.systemPackages = with pkgs; lib.mkMerge [ - [ - # top like tools - bmon # network monitor - gotop # fancy top - mtr # interactive traceroute - - # batch processing/automation - jq # sed for json - parallel # parallel batch processing - yq # sed for yaml - - # unix tools on steroids - curlie # better httpie (easier curl) - exa # better ls - fd # better find - ripgrep # better grep - - # file tools - aria # multithreaded http/ftp/bittorrent download manager - dos2unix # convert CRLF (dos) or CR (classic mac) line endings to LF (unix) - fdupes # find duplicate files - file # file type - hexyl # user friendly hex file viewer - hyperfine # cli benchmarking - megatools # cli for mega.nz - minio-client # client for s3 compatible storage systems - mktorrent # bittorrent seed file generator - ntfs3g # ntfs filesystem driver - rclone # rsync for cloud storage - rename # sed for filenames - rsync # incremental file transfer - tokei # fast cloc - wget # download tool - xdelta # binary diff - - # file format tools - imagemagick # image conversion - p7zip # 7z cli - pdftk # pdf multitool - sqlite-interactive # cli for sqlite databses - upx # executable packer - - # network tools - dnsutils # dig - gatling # high performance web serve - iperf - iperf2 # bandwidth measurement tool - nmap # port scanner - sshfs # mount remote host - vnstat # client for vnstatd - whois # whois client - zmap # scanner for large address spaces - - # system tools - libva-utils # vainfo - lm_sensors # temperature sensors - ncdu # interactive du - pciutils # lspci - reptyr # move process to current terminal - smartmontools # hard drive monitoring - usbutils # lsusb - - # clients - drone-cli # client for drone ci - hcloud # cli for Hetzner Cloud - libnotify # notify-send - - # function eye candy - fzf # fuzzy finder - pv # monitor progress in pipe - starship # zsh prompt - - # end user programs - apacheHttpd # for htpasswd - libqalculate # flexible calculator for humans - scrcpy # stream/control android phones over adb - taskwarrior # todo list manager - - # passwords - (pass-wayland.withExtensions (es: with es; [ pass-otp ])) # password manager - pwgen - pwgen-secure # password generator - xkcdpass # memorable password generator - - # misc - toilet # free figlet - python38Packages.ipython # better python repl (useful for one-liners) - - # vim - neovim-remote # controlling another neovim process - universal-ctags # ctags - - # git - gitAndTools.delta # nicer diff - gitAndTools.git-annex - gitAndTools.git-annex-remote-rclone # git for non source files - gitAndTools.pre-commit # pre-commit hook for git - - # nix tools - niv # depdendency manager - ] - (lib.mkIf config.sbruder.gui.enable [ - anki # flashcard SRS - filezilla # ftp client - gparted # gui for parted - qalculate-gtk # flexible calculator - antimicroX # gamepad to keyboard/mouse mapping - wl-clipboard # not really gui, but cli tool to manage wayland clipboard - wxhexeditor # hex editor - xfce.thunar # graphical file manager - ]) - ]; - programs = { adb.enable = true; bandwhich.enable = true; diff --git a/modules/web.nix b/modules/web.nix deleted file mode 100644 index 7c673c3..0000000 --- a/modules/web.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, lib, pkgs, ... }: - -lib.mkIf config.sbruder.gui.enable { - environment.systemPackages = with pkgs; [ - firefox-wayland - # Buidling chromium from source on a potato laptop is not fun - #(ungoogled-chromium.override { useOzone = true; }) - ]; -} diff --git a/users/simon/modules/ankisyncd.nix b/users/simon/modules/anki.nix similarity index 68% rename from users/simon/modules/ankisyncd.nix rename to users/simon/modules/anki.nix index c9256ca..15dc68c 100644 --- a/users/simon/modules/ankisyncd.nix +++ b/users/simon/modules/anki.nix @@ -1,5 +1,9 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: lib.mkIf config.sbruder.gui.enable { + home.packages = [ + pkgs.anki + ]; + home.file.".local/share/Anki2/addons21/ankisyncd/__init__.py".source = ../files/ankisyncd/__init__.py; } diff --git a/users/simon/modules/default.nix b/users/simon/modules/default.nix index d6f5b2d..58474d8 100644 --- a/users/simon/modules/default.nix +++ b/users/simon/modules/default.nix @@ -1,7 +1,7 @@ { imports = [ ./alacritty.nix - ./ankisyncd.nix + ./anki.nix ./git.nix ./gtk.nix ./htop.nix @@ -9,6 +9,7 @@ ./mpd.nix ./mpv.nix ./neovim.nix + ./programs.nix ./sway.nix ./tmux.nix ./vdirsyncer.nix diff --git a/users/simon/modules/programs.nix b/users/simon/modules/programs.nix new file mode 100644 index 0000000..415cc68 --- /dev/null +++ b/users/simon/modules/programs.nix @@ -0,0 +1,173 @@ +{ config, lib, pkgs, ... }: + +{ + home.packages = with pkgs; [ + # top like tools + bmon # network monitor + gotop # fancy top + mtr # interactive traceroute + + # batch processing/automation + jq # sed for json + parallel # parallel batch processing + yq # sed for yaml + + # unix tools on steroids + curlie # better httpie (easier curl) + exa # better ls + fd # better find + ripgrep # better grep + + # file tools + aria # multithreaded http/ftp/bittorrent download manager + dos2unix # convert CRLF (dos) or CR (classic mac) line endings to LF (unix) + fdupes # find duplicate files + file # file type + hexyl # user friendly hex file viewer + hyperfine # cli benchmarking + megatools # cli for mega.nz + minio-client # client for s3 compatible storage systems + mktorrent # bittorrent seed file generator + ntfs3g # ntfs filesystem driver + rclone # rsync for cloud storage + rename # sed for filenames + rsync # incremental file transfer + tokei # fast cloc + wget # download tool + xdelta # binary diff + + # file format tools + imagemagick # image conversion + p7zip # 7z cli + pdftk # pdf multitool + sqlite-interactive # cli for sqlite databses + upx # executable packer + + # network tools + dnsutils # dig + gatling # high performance web serve + iperf + iperf2 # bandwidth measurement tool + nmap # port scanner + sshfs # mount remote host + vnstat # client for vnstatd + whois # whois client + zmap # scanner for large address spaces + + # system tools + libva-utils # vainfo + lm_sensors # temperature sensors + ncdu # interactive du + pciutils # lspci + reptyr # move process to current terminal + smartmontools # hard drive monitoring + usbutils # lsusb + + # clients + drone-cli # client for drone ci + hcloud # cli for Hetzner Cloud + libnotify # notify-send + + # function eye candy + fzf # fuzzy finder + pv # monitor progress in pipe + starship # zsh prompt + + # end user programs + apacheHttpd # for htpasswd + libqalculate # flexible calculator for humans + scrcpy # stream/control android phones over adb + taskwarrior # todo list manager + + # passwords + (pass-wayland.withExtensions (es: with es; [ pass-otp ])) # password manager + pwgen + pwgen-secure # password generator + xkcdpass # memorable password generator + + # misc + toilet # free figlet + python38Packages.ipython # better python repl (useful for one-liners) + + # vim + neovim-remote # controlling another neovim process + universal-ctags # ctags + + # git + gitAndTools.delta # nicer diff + gitAndTools.git-annex + gitAndTools.git-annex-remote-rclone # git for non source files + gitAndTools.pre-commit # pre-commit hook for git + + # nix tools + niv # depdendency manager + + ## media + + # audio and video + ffmpeg-full # A/V multitool + mediainfo # show information about media files + mkvtoolnix-cli # matroska (de-)muxing + youtube-dl # universal video downloader + + # audio + abcde # cd ripper + flac # flac encoder + shntool # split audio with cue + sidplayfp # SID chiptune player + sox # “Swiss Army knife of audio manipulation” + + # images + exiftool # manipulate EXIF meta data + jpegoptim # lossless jpeg optimiser + libwebp # tools for webp image format + optipng # lossless png optimiser + pngcrush + pngquant # lossy png optimisers + + # documents + mupdf # document (pdf) viewer and tools + ] ++ (if config.sbruder.gui.enable then [ + # communication + claws-mail # email client that looks ugly but just works + firefox-wayland # the least bad browser + (mumble.override { pulseSupport = true; }) # VoIP group chat + ungoogled-chromium # useful for exporting pages as pdf + + # creative/design + blender # 3d animation + darktable # photo development + gimp-with-plugins # bitmap image editor + krita # drawing + openscad # parametric/procedural 3d modelling + inkscape # vector graphics editor + + # audio + audacity # audio editor + picard # musicbrainz tagger + + # documents + calibre # ebook library + + # office + aspellDicts.de + aspellDicts.en + hunspellDicts.de-de + hunspellDicts.en-gb-ise # dictionary + gscan2pdf # scanning tool + jameica # application framework (used for hibiscus online banking) + libreoffice # office suite + pdfsam-basic # pdf multitool + xournalpp # notebook + xsane # scanning tool + + # tools + filezilla # ftp client + gparted # gui for parted + qalculate-gtk # flexible calculator + antimicroX # gamepad to keyboard/mouse mapping + wl-clipboard # not really gui, but cli tool to manage wayland clipboard + wxhexeditor # hex editor + xfce.thunar # graphical file manager + ] else [ ]); +}