2021-11-25 11:55:30 +00:00
|
|
|
# The module for anything dev-related.
|
|
|
|
# If you want to see editor-specific modules, see `modules/editors.nix`.
|
|
|
|
{ config, options, lib, pkgs, ... }:
|
|
|
|
|
2021-11-25 13:45:48 +00:00
|
|
|
let cfg = config.modules.dev;
|
2021-11-25 11:55:30 +00:00
|
|
|
in {
|
|
|
|
options.modules.dev = {
|
2021-11-25 13:45:48 +00:00
|
|
|
enable = lib.mkEnableOption
|
|
|
|
"Configures my barebones requirement for a development environment.";
|
|
|
|
shell.enable =
|
|
|
|
lib.mkEnableOption "Installs of the shell utilities I rely on.";
|
|
|
|
virtualization.enable = lib.mkEnableOption
|
|
|
|
"Configures my virtualization-related stuff for my development. (I sometimes have to use these.)";
|
2021-11-25 11:55:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
|
|
({
|
2021-11-25 13:45:48 +00:00
|
|
|
# I want to include documentations for my own sanity, OK?
|
|
|
|
documentation = {
|
|
|
|
enable = true;
|
|
|
|
dev.enable = true;
|
|
|
|
nixos.enable = true;
|
2021-12-04 15:27:10 +00:00
|
|
|
man.generateCaches = true;
|
2021-11-25 13:45:48 +00:00
|
|
|
};
|
2021-11-25 11:55:30 +00:00
|
|
|
|
2021-11-25 13:45:48 +00:00
|
|
|
# Configure all of the development-related configuration in the system.
|
2021-12-08 04:18:37 +00:00
|
|
|
|
|
|
|
# Install Git, our favorite version control system.
|
|
|
|
# In this case, we want ALL OF THE EXTENSIONS!
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
lfs.enable = true;
|
|
|
|
package = pkgs.gitFull;
|
|
|
|
};
|
|
|
|
|
2021-11-25 13:45:48 +00:00
|
|
|
programs.gnupg = { agent.enable = true; };
|
2021-11-25 11:55:30 +00:00
|
|
|
|
2021-11-25 13:45:48 +00:00
|
|
|
# Convenience!
|
|
|
|
environment.localBinInPath = true;
|
2021-11-25 11:55:30 +00:00
|
|
|
|
2021-11-25 13:45:48 +00:00
|
|
|
# This is set as our system packages for the sake of convenience.
|
|
|
|
services.lorri.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
cachix # Compile no more by using someone's binary cache!
|
|
|
|
curl # Our favorite network client.
|
|
|
|
cmake # The poster boy for the hated build system.
|
|
|
|
direnv # The power of local development environment.
|
2021-12-04 15:27:10 +00:00
|
|
|
gcc # The usual toolchain.
|
2021-11-25 13:45:48 +00:00
|
|
|
gnumake # Make your life easier with GNU Make.
|
2021-11-30 01:03:05 +00:00
|
|
|
moreutils # Less is more but more utilities, the merrier.
|
2021-12-08 04:18:37 +00:00
|
|
|
|
|
|
|
# I SAID ALL OF THE GIT EXTENSIONS!
|
|
|
|
git-crypt
|
2021-11-25 13:45:48 +00:00
|
|
|
];
|
2021-11-25 11:55:30 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
(lib.mkIf cfg.shell.enable {
|
|
|
|
environment.systemPackages = with pkgs; [
|
2021-11-25 13:45:48 +00:00
|
|
|
alacritty # The terminal emu that can run fast.
|
|
|
|
lazygit # Git interface for the lazy.
|
|
|
|
fd # Oh nice, a more reliable `find`.
|
|
|
|
ripgrep # On nice, a more reliable `grep`.
|
|
|
|
exa # Oh nice, a shinier `ls`.
|
|
|
|
bat # dog > bat > cat
|
|
|
|
fzf # A fuzzy finder that enables fuzzy finding not furry finding, a common misconception.
|
|
|
|
gopass # An improved version of the password manager for hipsters.
|
|
|
|
zoxide # Gain teleportation abilities!
|
2021-11-25 11:55:30 +00:00
|
|
|
];
|
|
|
|
})
|
|
|
|
|
|
|
|
# !!! Please add your user to the "libvirtd" group.
|
|
|
|
(lib.mkIf cfg.virtualization.enable {
|
|
|
|
# Enable podman just as my main container runtime or something.
|
|
|
|
virtualisation.podman = {
|
|
|
|
enable = true;
|
2021-11-25 13:45:48 +00:00
|
|
|
dockerCompat = true;
|
2021-11-25 11:55:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Enable libvirt for muh qemu.
|
|
|
|
virtualisation.libvirtd = {
|
|
|
|
enable = true;
|
2021-11-25 13:45:48 +00:00
|
|
|
qemu.ovmf.enable = true;
|
2021-11-25 11:55:30 +00:00
|
|
|
};
|
|
|
|
})
|
|
|
|
]);
|
|
|
|
}
|