2021-11-25 11:55:30 +00:00
|
|
|
# The module for anything dev-related.
|
|
|
|
{ config, options, lib, pkgs, ... }:
|
|
|
|
|
2022-01-09 05:38:59 +00:00
|
|
|
let cfg = config.profiles.dev;
|
2021-11-25 11:55:30 +00:00
|
|
|
in {
|
2022-01-09 05:38:59 +00:00
|
|
|
options.profiles.dev = {
|
2021-11-25 13:45:48 +00:00
|
|
|
enable = lib.mkEnableOption
|
2021-12-11 05:16:45 +00:00
|
|
|
"configurations of foo-dogsquared's barebones requirement for a development environment.";
|
|
|
|
shell.enable = lib.mkEnableOption
|
|
|
|
"installation of the shell utilities foo-dogsquared rely on";
|
|
|
|
virtualization.enable =
|
|
|
|
lib.mkEnableOption "virtualization-related stuff for development";
|
2021-12-25 12:35:55 +00:00
|
|
|
neovim.enable = lib.mkEnableOption "Neovim";
|
2021-11-25 11:55:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
|
|
({
|
2022-07-18 23:07:53 +00:00
|
|
|
systemd.coredump = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = ''
|
|
|
|
ProcessSizeMax=10G
|
|
|
|
ExternalSizeMax=10G
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
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-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
|
2022-04-30 12:30:22 +00:00
|
|
|
|
|
|
|
github-cli # Client for GitHub.
|
|
|
|
hut # And one for Sourcehut.
|
|
|
|
act # Finally, a local environment for testing GitHub workflows.
|
2021-11-25 13:45:48 +00:00
|
|
|
];
|
2022-08-27 05:40:56 +00:00
|
|
|
|
|
|
|
systemd.user.services.upgrade-nix-profile = {
|
|
|
|
description = ''
|
|
|
|
Update packages installed through `nix profile`.
|
|
|
|
'';
|
|
|
|
enable = false;
|
|
|
|
script = "nix profile upgrade '.*'";
|
|
|
|
};
|
2021-11-25 11:55:30 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
(lib.mkIf cfg.shell.enable {
|
|
|
|
environment.systemPackages = with pkgs; [
|
2022-08-27 05:40:56 +00:00
|
|
|
bandwhich # Sniffing your packets.
|
2021-11-25 13:45:48 +00:00
|
|
|
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 {
|
2022-01-25 01:32:17 +00:00
|
|
|
# virt-manager as my frontend.
|
2022-06-09 05:00:07 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
distrobox
|
|
|
|
virt-manager
|
|
|
|
];
|
2022-01-25 01:32:17 +00:00
|
|
|
|
2022-08-13 00:31:09 +00:00
|
|
|
# Enable Docker just as my main container runtime or something.
|
|
|
|
virtualisation.docker.enable = true;
|
2021-11-25 11:55:30 +00:00
|
|
|
|
|
|
|
# Enable libvirt for muh qemu.
|
|
|
|
virtualisation.libvirtd = {
|
|
|
|
enable = true;
|
2022-01-25 01:32:17 +00:00
|
|
|
qemu.package = pkgs.qemu_full;
|
2021-11-25 13:45:48 +00:00
|
|
|
qemu.ovmf.enable = true;
|
2021-11-25 11:55:30 +00:00
|
|
|
};
|
|
|
|
})
|
2021-12-25 12:35:55 +00:00
|
|
|
|
|
|
|
(lib.mkIf cfg.neovim.enable {
|
|
|
|
programs.neovim = {
|
|
|
|
enable = true;
|
|
|
|
defaultEditor = true;
|
|
|
|
withNodeJs = true;
|
|
|
|
withRuby = true;
|
|
|
|
|
|
|
|
# I want the BLEEDING EDGE!
|
|
|
|
package = pkgs.neovim-nightly;
|
|
|
|
};
|
|
|
|
|
2022-04-30 12:30:22 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
editorconfig-core-c
|
|
|
|
tree-sitter
|
|
|
|
];
|
2021-12-25 12:35:55 +00:00
|
|
|
})
|
2021-11-25 11:55:30 +00:00
|
|
|
]);
|
|
|
|
}
|