unify home-manager configurations of workmac and main laptop
- manually inspected changes of "workmac" branch - modularised out some config parts into modules
This commit is contained in:
parent
2bdff39416
commit
f14b290937
12 changed files with 875 additions and 472 deletions
47
home/modules/latex.nix
Normal file
47
home/modules/latex.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
system,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with pkgs;
|
||||
let
|
||||
latexGuiTools = [
|
||||
texmaker
|
||||
kile
|
||||
biber
|
||||
];
|
||||
in
|
||||
{
|
||||
options.schmittlauch.latex.guiTools = lib.mkEnableOption "Install GUI LaTeX tools like editors";
|
||||
|
||||
config.home.packages = [
|
||||
(texlive.combine {
|
||||
inherit (texlive)
|
||||
scheme-medium
|
||||
|
||||
xetex
|
||||
luatex
|
||||
unicode-math
|
||||
fontspec
|
||||
collection-binextra
|
||||
collection-fontsrecommended
|
||||
collection-latex
|
||||
collection-latexextra
|
||||
collection-latexrecommended
|
||||
collection-langgerman
|
||||
moderncv
|
||||
fontawesome5
|
||||
academicons
|
||||
acronym
|
||||
ccicons
|
||||
fontawesome
|
||||
biblatex
|
||||
logreq
|
||||
koma-script
|
||||
;
|
||||
})
|
||||
] ++ lib.optionals config.schmittlauch.latex.guiTools latexGuiTools;
|
||||
}
|
284
home/modules/packages.nix
Normal file
284
home/modules/packages.nix
Normal file
|
@ -0,0 +1,284 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
|
||||
with pkgs;
|
||||
let
|
||||
cfg = config.schmittlauch.packages;
|
||||
unstable = inputs.nixos-unstable.legacyPackages.${system};
|
||||
|
||||
graphicsApps =
|
||||
[
|
||||
inkscape
|
||||
darktable
|
||||
exiftool
|
||||
gimp
|
||||
]
|
||||
++ (with gimpPlugins; [
|
||||
fourier
|
||||
lqrPlugin
|
||||
])
|
||||
++ lib.optionals pkgs.stdenv.isLinux [
|
||||
hugin
|
||||
luminanceHDR
|
||||
xournal
|
||||
];
|
||||
|
||||
multimediaApps =
|
||||
[
|
||||
mpv
|
||||
yt-dlp
|
||||
]
|
||||
++ lib.optionals pkgs.stdenv.isLinux [
|
||||
vlc
|
||||
amarok
|
||||
clementine
|
||||
elisa
|
||||
musescore
|
||||
tenacity
|
||||
soundkonverter
|
||||
config.nur.repos.fooker.studio-link
|
||||
];
|
||||
|
||||
cliApps =
|
||||
[
|
||||
myVim
|
||||
htop
|
||||
tmux
|
||||
httpie
|
||||
ponysay
|
||||
gti
|
||||
tree
|
||||
lsof
|
||||
mosh
|
||||
openssh
|
||||
sshfs-fuse
|
||||
cryfs
|
||||
openssh
|
||||
sshuttle
|
||||
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
|
||||
|
||||
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
|
||||
config.nur.repos.schmittlauch.lolcommits
|
||||
];
|
||||
|
||||
nixHelpers = [
|
||||
nixpkgs-review
|
||||
unstable.nixfmt-rfc-style
|
||||
nix-top
|
||||
statix
|
||||
];
|
||||
devTools =
|
||||
[
|
||||
curl
|
||||
httpie
|
||||
gcc
|
||||
shellcheck
|
||||
mtr
|
||||
ripgrep
|
||||
gitui
|
||||
lazygit
|
||||
pre-commit
|
||||
scriv
|
||||
|
||||
# Haskell
|
||||
ghc
|
||||
cabal2nix
|
||||
]
|
||||
++ lib.optionals pkgs.stdenv.isLinux [
|
||||
gdb
|
||||
strace
|
||||
ltrace
|
||||
valgrind
|
||||
zeal
|
||||
];
|
||||
|
||||
pythonTools = with python3Packages; [
|
||||
notebook
|
||||
ipython
|
||||
pip
|
||||
numpy
|
||||
matplotlib
|
||||
jedi
|
||||
jedi-language-server
|
||||
black
|
||||
flake8
|
||||
mypy
|
||||
];
|
||||
|
||||
fonts = [
|
||||
comic-neue
|
||||
source-sans-pro
|
||||
source-code-pro
|
||||
source-serif-pro
|
||||
ubuntu_font_family
|
||||
twemoji-color-font
|
||||
open-sans
|
||||
(iosevka-bin.override { variant = "curly-slab"; })
|
||||
config.nur.repos.schmittlauch.vollkorn
|
||||
# TODO: humor-sans
|
||||
|
||||
# fcio corporate design, TODO module
|
||||
fira-code
|
||||
fira-mono
|
||||
# TODO fira-sans + condensed
|
||||
# TODO museo 500
|
||||
];
|
||||
|
||||
games = [
|
||||
superTuxKart
|
||||
hedgewars
|
||||
];
|
||||
|
||||
desktopApps = [
|
||||
firefox
|
||||
chromium
|
||||
falkon
|
||||
thunderbird
|
||||
calibre
|
||||
dino
|
||||
zotero
|
||||
keepassxc
|
||||
ding
|
||||
aspell
|
||||
aspellDicts.de
|
||||
aspellDicts.en
|
||||
# for kate/KDE applications
|
||||
hunspellDicts.de-de
|
||||
hunspellDicts.en-us
|
||||
hunspellDicts.en-gb-ise
|
||||
seafile-client
|
||||
alacritty
|
||||
libreoffice-qt # fresh with KDE integration
|
||||
backintime-common
|
||||
anki
|
||||
signal-desktop
|
||||
(tor-browser-bundle-bin.override {
|
||||
mediaSupport = true;
|
||||
pulseaudioSupport = pkgs.stdenv.isLinux;
|
||||
})
|
||||
pdfpc
|
||||
quaternion
|
||||
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 =
|
||||
with plasma5Packages;
|
||||
with kdeGear;
|
||||
[
|
||||
okular
|
||||
gwenview
|
||||
yakuake
|
||||
kmail
|
||||
kontact
|
||||
korganizer
|
||||
akonadi-mime # for KOrganizer
|
||||
kaddressbook
|
||||
kdeconnect
|
||||
dolphin
|
||||
spectacle
|
||||
kate
|
||||
kleopatra
|
||||
qdirstat
|
||||
ark
|
||||
kwalletmanager
|
||||
ktouch
|
||||
kcharselect
|
||||
konversation
|
||||
okteta
|
||||
krdc
|
||||
skanlite
|
||||
akonadiconsole
|
||||
tokodon # mastodon client
|
||||
]
|
||||
++ (with kdeFrameworks; [
|
||||
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";
|
||||
desktop = lib.mkEnableOption "Enable a common set of desktop applications";
|
||||
kde = lib.mkEnableOption "Enable a common set of KDE applications";
|
||||
};
|
||||
# TODO fonts in separate module
|
||||
# TODO latex in separate module
|
||||
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.desktop desktopApps)
|
||||
++ (lib.optional cfg.kde kdeTools)
|
||||
);
|
||||
|
||||
nixpkgs.overlays = import ../overlays.nix;
|
||||
nixpkgs.config = {
|
||||
clementine.spotify = false;
|
||||
vim = {
|
||||
gui = "gtk3";
|
||||
python = true;
|
||||
multibyteSupport = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
111
home/modules/vscodium.nix
Normal file
111
home/modules/vscodium.nix
Normal file
|
@ -0,0 +1,111 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
extensions =
|
||||
with pkgs.vscode-extensions;
|
||||
[
|
||||
ms-python.python
|
||||
vscodevim.vim
|
||||
yzhang.markdown-all-in-one
|
||||
bungcip.better-toml
|
||||
eamodio.gitlens
|
||||
jnoortheen.nix-ide
|
||||
mkhl.direnv
|
||||
]
|
||||
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "Sync-Rsync";
|
||||
publisher = "vscode-ext";
|
||||
version = "0.36.0";
|
||||
sha256 = "sha256-0b/OHLZfXo0NAVAVkzZSqMGDzF0uvPRoiqsZtW1iOdA";
|
||||
}
|
||||
# TODO: probably available in nixpkgs soonish?
|
||||
{
|
||||
name = "mypy-type-checker";
|
||||
publisher = "ms-python";
|
||||
version = "2023.3.12681020";
|
||||
sha256 = "sha256-rhed7CQlvxksVCGc9nPU2oYQWtXcAV5TzuG63e8Y3zM=";
|
||||
}
|
||||
{
|
||||
name = "black-formatter";
|
||||
publisher = "ms-python";
|
||||
version = "2023.5.12771008";
|
||||
sha256 = "sha256-lJG0RRUUMhQGs2a6oBtoqt+uY1kSJ0+cbmaP07hNh2o=";
|
||||
}
|
||||
{
|
||||
name = "vscode-pets";
|
||||
publisher = "tonybaloney";
|
||||
version = "1.25.1";
|
||||
sha256 = "sha256-as3e2LzKBSsiGs/UGIZ06XqbLh37irDUaCzslqITEJQ=";
|
||||
}
|
||||
];
|
||||
userSettings =
|
||||
let
|
||||
defaultPython = pkgs.python3.withPackages (ps: [
|
||||
ps.jedi
|
||||
ps.jedi-language-server
|
||||
ps.pip
|
||||
ps.setuptools # for pkg_resources
|
||||
ps.black
|
||||
ps.mypy
|
||||
]);
|
||||
in
|
||||
{
|
||||
"editor.fontLigatures" = true;
|
||||
"window.autoDetectColorScheme" = true;
|
||||
"workbench.preferredDarkColorTheme" = "Default Dark Modern";
|
||||
"workbench.preferredLightColorTheme" = "Default Light Modern";
|
||||
"[nix]" = {
|
||||
"editor.insertSpaces" = true;
|
||||
"editor.tabSize" = 2;
|
||||
# for now, disable automatic formatting to prevent disruption of existing code bases
|
||||
"editor.formatOnPaste" = false;
|
||||
"editor.formatOnSave" = false;
|
||||
"editor.formatOnType" = false;
|
||||
};
|
||||
"nix.formatterPath" = "${pkgs.nixfmt}/bin/nixfmt";
|
||||
"editor.fontSize" = 13;
|
||||
"editor.fontWeight" = "normal";
|
||||
"git.detectSubmodulesLimit" = 30;
|
||||
"[python]" = {
|
||||
"breadcrumbs.showClasses" = true;
|
||||
"breadcrumbs.showFunctions" = true;
|
||||
"gitlens.codeLens.symbolScopes" = [ "!Module" ];
|
||||
"editor.defaultFormatter" = "ms-python.black-formatter";
|
||||
"editor.formatOnSave" = true;
|
||||
};
|
||||
"python.languageServer" = "Jedi"; # don't use proprietary pylance server
|
||||
"python.defaultInterpreterPath" = "${defaultPython}/bin/python";
|
||||
"black-formatter.path" = [ "${pkgs.python3Packages.black}/bin/black" ];
|
||||
"black-formatter.importStrategy" = "fromEnvironment";
|
||||
"mypy-type-checker.path" = [ "${pkgs.python3Packages.mypy}/bin/mypy" ];
|
||||
"mypy-type-checker.importStrategy" = "fromEnvironment";
|
||||
"mypy-type-checker.args" = [ "--ignore-missing-imports" ];
|
||||
"gitlens.telemetry.enabled" = false;
|
||||
"vim.highlightedyank.enable" = true;
|
||||
"vim.history" = 500;
|
||||
"vim.neovimUseConfigFile" = true;
|
||||
"vim.enableNeovim" = true;
|
||||
"git.suggestSmartCommit" = false;
|
||||
"editor.rulers" = [ 79 ];
|
||||
"vim.useSystemClipboard" = true;
|
||||
"vim.smartRelativeLine" = true;
|
||||
"diffEditor.ignoreTrimWhitespace" = false;
|
||||
"files.associations" = {
|
||||
"*.py" = "python";
|
||||
};
|
||||
"editor.renderWhitespace" = "all";
|
||||
"editor.fontFamily" = "Iosevka Curly Slab, Menlo, Monaco, 'Courier New', monospace";
|
||||
"vim.neovimPath" = "/Users/os/.nix-profile/bin/nvim";
|
||||
"sync-rsync.options" = [ ];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue