nix: Dev stuff & misc behind options

This commit is contained in:
Geoffrey Frogeye 2023-11-22 16:32:20 +01:00
parent eb2f12b6c5
commit 37a8134c23
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
8 changed files with 112 additions and 67 deletions

View file

@ -8,4 +8,5 @@
networking.hostName = "curacao"; networking.hostName = "curacao";
frogeye.extra = true; frogeye.extra = true;
frogeye.desktop.xorg = true; frogeye.desktop.xorg = true;
frogeye.dev.docker = true;
} }

View file

@ -10,4 +10,9 @@
frogeye.extra = true; frogeye.extra = true;
frogeye.desktop.xorg = true; frogeye.desktop.xorg = true;
frogeye.desktop.nixGLIntel = true; frogeye.desktop.nixGLIntel = true;
frogeye.dev.ansible.enable = true;
frogeye.dev.c.enable = true;
frogeye.dev.docker.enable = true;
frogeye.dev.fpga.enable = true;
frogeye.dev.python.enable = true;
} }

View file

@ -394,19 +394,16 @@ in
wget wget
curl curl
python3Packages.pip python3Packages.pip
ansible # TODO Reevaluate
# shell # shell
zsh-completions zsh-completions
nix-zsh-completions nix-zsh-completions
zsh-history-substring-search zsh-history-substring-search
antigen # TODO Reevaluate
powerline-go powerline-go
# terminal essentials # terminal essentials
moreutils moreutils
man man
visidata
# nodePackages.insect # FIXME Don't install on aarch64 # nodePackages.insect # FIXME Don't install on aarch64
# TODO Use whatever replaces insect # TODO Use whatever replaces insect
translate-shell translate-shell
@ -438,7 +435,6 @@ in
speedtest-cli speedtest-cli
# multimedia toolbox # multimedia toolbox
ffmpeg
sox sox
imagemagick imagemagick

View file

@ -1,17 +1,9 @@
{ pkgs, config, ... }: { { pkgs, config, ... }: {
# TODO Separate in diffrent packages once the structure is finalized... # TODO Maybe should be per-directory dotenv
# or connvert into per-directory requirements # Or not, for neovim
# Always on
home.packages = with pkgs; [ home.packages = with pkgs; [
# Ansible
ansible
ansible-lint
# C/C++
cmake
clang
ccache
gdb
# Common # Common
perf-tools perf-tools
git git
@ -20,14 +12,6 @@
universal-ctags universal-ctags
highlight highlight
# Docker
docker
docker-compose
# FPGA
verilog
# ghdl # TODO Not on aarch64
# Network # Network
socat socat
dig dig
@ -38,18 +22,45 @@
# nix # nix
nix nix
# Python # Always on (graphical)
python3Packages.ipython
] ++ lib.optionals config.frogeye.desktop.xorg [ ] ++ lib.optionals config.frogeye.desktop.xorg [
# Common # Common
zeal-qt6 # Offline documentation zeal-qt6 # Offline documentation
# Network
wireshark-qt
# Ansible
] ++ lib.optionals config.frogeye.dev.ansible [
ansible
ansible-lint
# C/C++
] ++ lib.optionals config.frogeye.dev.c [
cmake
clang
ccache
gdb
# Docker
] ++ lib.optionals config.frogeye.dev.docker [
docker
docker-compose
# FPGA # FPGA
] ++ lib.optionals config.frogeye.dev.fpga [
verilog
# ghdl # TODO Not on aarch64
# FPGA (graphical)
] ++ lib.optionals (config.frogeye.desktop.xorg && config.frogeye.dev.fpga) [
yosys yosys
gtkwave gtkwave
# Network # Python
wireshark-qt ] ++ lib.optionals config.frogeye.dev.python [
python3Packages.ipython
]; ];
} }

View file

@ -1,6 +1,10 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
home.packages = with pkgs; lib.mkIf config.frogeye.extra ([ config = lib.mkIf config.frogeye.extra {
programs = {
pandoc.enable = true;
};
home.packages = with pkgs; ([
# android tools # android tools
android-tools android-tools
@ -9,9 +13,11 @@
megatools megatools
# transmission TODO Collision if both transmissions are active? # transmission TODO Collision if both transmissions are active?
# Multimedia toolbox
ffmpeg
# documents # documents
pandoc visidata
texlive.combined.scheme-full texlive.combined.scheme-full
pdftk pdftk
hunspell hunspell
@ -35,6 +41,7 @@
# downloading # downloading
transmission-qt transmission-qt
# FIXME Below not on aarch64
# wine # wine
wine wine
# TODO wine-gecko wine-mono lib32-libpulse (?) # TODO wine-gecko wine-mono lib32-libpulse (?)
@ -46,5 +53,5 @@
# TODO factorio # TODO factorio
]); ]);
};
} }

View file

@ -167,7 +167,7 @@ in
jsonls.enable = true; # JSON jsonls.enable = true; # JSON
lua-ls.enable = true; # Lua (for Neovim debugging) lua-ls.enable = true; # Lua (for Neovim debugging)
# FIXME perlls # FIXME perlls
pylsp = { pylsp = lib.mkIf config.frogeye.dev.python {
# Python # Python
enable = true; enable = true;
settings.plugins = { settings.plugins = {
@ -288,10 +288,14 @@ in
# Language-specific # Language-specific
tcomment_vim # Language-aware (un)commenting tcomment_vim # Language-aware (un)commenting
] ++ lib.optionals config.frogeye.extra [
vim-LanguageTool # Check grammar for human languages vim-LanguageTool # Check grammar for human languages
] ++ lib.optionals config.programs.pandoc.enable [
vim-pandoc # Pandoc-specific stuff because there's no LSP for it vim-pandoc # Pandoc-specific stuff because there's no LSP for it
vim-pandoc-syntax vim-pandoc-syntax
] ++ lib.optionals config.frogeye.dev.c [
nvim-dap # Debug Adapter Protocol client nvim-dap # Debug Adapter Protocol client
] ++ lib.optionals config.frogeye.dev.ansible [
ansible-vim # FIXME See if it doesn't require to do ./UltiSnips/generate.sh ansible-vim # FIXME See if it doesn't require to do ./UltiSnips/generate.sh
]; ];
extraConfigLua = lib.strings.concatMapStringsSep "\n" (f: builtins.readFile f) [ extraConfigLua = lib.strings.concatMapStringsSep "\n" (f: builtins.readFile f) [
@ -323,10 +327,12 @@ in
inoremap <silent><expr> <C-f> compe#scroll({ 'delta': +4 }) inoremap <silent><expr> <C-f> compe#scroll({ 'delta': +4 })
inoremap <silent><expr> <C-d> compe#scroll({ 'delta': -4 }) inoremap <silent><expr> <C-d> compe#scroll({ 'delta': -4 })
'' + lib.optionalString config.frogeye.extra ''
" languagetool " languagetool
let g:languagetool_cmd = "${pkgs.languagetool}/bin/languagetool-commandline" let g:languagetool_cmd = "${pkgs.languagetool}/bin/languagetool-commandline"
" TODO Doesn't work " TODO Doesn't work
'' + lib.optionalString config.programs.pandoc.enable ''
" vim-pandox " vim-pandox
let g:pandoc#modules#disabled = ["folding"] let g:pandoc#modules#disabled = ["folding"]
let g:pandoc#spell#enabled = 0 let g:pandoc#spell#enabled = 0

View file

@ -6,5 +6,21 @@
xorg = lib.mkEnableOption "Enable X11 support"; xorg = lib.mkEnableOption "Enable X11 support";
nixGLIntel = lib.mkEnableOption "Enable nixGLIntel/nixVulkanIntel for windows manager"; nixGLIntel = lib.mkEnableOption "Enable nixGLIntel/nixVulkanIntel for windows manager";
}; };
dev = {
ansible = lib.mkEnableOption "Ansible dev stuff";
c = lib.mkEnableOption "C/C++ dev stuff";
docker = lib.mkEnableOption "Docker dev stuff";
fpga = lib.mkEnableOption "FPGA dev stuff";
python = lib.mkEnableOption "Python dev stuff";
};
};
config = {
frogeye = {
dev = {
ansible = lib.mkDefault true;
python = lib.mkDefault true;
};
};
}; };
} }

View file

@ -10,5 +10,8 @@
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
networking.hostName = "pindakaas"; networking.hostName = "pindakaas";
frogeye.extra = false; # FIXME Not working yet
frogeye.desktop.xorg = true; frogeye.desktop.xorg = true;
frogeye.dev.docker = true;
} }