2024-12-18 07:23:40 +00:00
|
|
|
{ config, lib, pkgs, options, ... }@attrs:
|
2023-12-18 00:58:34 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
userCfg = config.users.foo-dogsquared;
|
|
|
|
cfg = userCfg.setups.development;
|
2024-10-21 07:26:05 +00:00
|
|
|
in {
|
2023-12-18 00:58:34 +00:00
|
|
|
options.users.foo-dogsquared.setups.development.enable =
|
|
|
|
lib.mkEnableOption "foo-dogsquared's software development setup";
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
2024-01-01 05:56:10 +00:00
|
|
|
{
|
2024-07-31 13:47:48 +00:00
|
|
|
state.paths.ignoreDirectories = [
|
2024-05-10 08:42:58 +00:00
|
|
|
"node_modules" # For Node projects.
|
|
|
|
"result" # For Nix builds.
|
|
|
|
"target" # For Rust builds.
|
|
|
|
];
|
|
|
|
|
2024-01-01 05:56:10 +00:00
|
|
|
users.foo-dogsquared.programs = {
|
|
|
|
shell.enable = lib.mkDefault true;
|
2024-11-11 08:33:56 +00:00
|
|
|
git = {
|
|
|
|
enable = lib.mkDefault true;
|
|
|
|
instaweb.enable = true;
|
|
|
|
};
|
2024-08-23 12:27:28 +00:00
|
|
|
jujutsu.enable = lib.mkDefault true;
|
2024-01-17 09:34:10 +00:00
|
|
|
keys.gpg.enable = true;
|
|
|
|
keys.ssh.enable = true;
|
2024-01-01 05:56:10 +00:00
|
|
|
terminal-multiplexer.enable = lib.mkDefault true;
|
2024-12-04 08:28:50 +00:00
|
|
|
terminal-emulator.enable = lib.mkDefault true;
|
2024-01-01 05:56:10 +00:00
|
|
|
};
|
2023-12-18 00:58:34 +00:00
|
|
|
|
2024-01-22 06:48:55 +00:00
|
|
|
suites.dev = {
|
2024-01-01 05:56:10 +00:00
|
|
|
enable = true;
|
|
|
|
extras.enable = true;
|
|
|
|
coreutils-replacement.enable = true;
|
|
|
|
shell.enable = true;
|
|
|
|
servers.enable = true;
|
|
|
|
};
|
2023-12-18 00:58:34 +00:00
|
|
|
|
2024-12-09 11:27:43 +00:00
|
|
|
# Rootless podman.
|
|
|
|
services.podman = {
|
|
|
|
enable = true;
|
|
|
|
enableTypeChecks = false;
|
|
|
|
autoUpdate = {
|
|
|
|
enable = true;
|
|
|
|
onCalendar = "weekly";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-12-18 07:23:40 +00:00
|
|
|
users.foo-dogsquared.programs.custom-homepage.sections.services.links =
|
|
|
|
let
|
|
|
|
hasCockpitEnabled = attrs.nixosConfig.services.cockpit.enable or false;
|
|
|
|
in
|
|
|
|
lib.optionals hasCockpitEnabled (lib.singleton {
|
|
|
|
url = "http://localhost:${builtins.toString attrs.nixosConfig.services.cockpit.port}";
|
|
|
|
text = "Cockpit WebUI";
|
|
|
|
});
|
|
|
|
|
2024-01-01 05:56:10 +00:00
|
|
|
systemd.user.sessionVariables = {
|
|
|
|
MANPAGER = "nvim +Man!";
|
|
|
|
EDITOR = "nvim";
|
|
|
|
};
|
2023-12-24 10:14:18 +00:00
|
|
|
|
2024-01-01 05:56:10 +00:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
cachix # Compile no more by using someone's binary cache!
|
|
|
|
regex-cli # Save some face of confusion for yourself.
|
|
|
|
dt # Get that functional gawk.
|
2024-12-09 11:27:43 +00:00
|
|
|
jq # Get that JSON querying tool.
|
2024-01-01 05:56:10 +00:00
|
|
|
recode # Convert between different encodings.
|
2024-09-13 09:23:54 +00:00
|
|
|
go-migrate # Go potential migraines.
|
2024-10-21 07:26:05 +00:00
|
|
|
oils-for-unix # Rev them up, reverent admin.
|
2024-12-18 07:23:40 +00:00
|
|
|
lnav # Navigate with some logs like what some pirates do.
|
2024-11-06 12:07:51 +00:00
|
|
|
|
2024-11-30 05:20:58 +00:00
|
|
|
# Testing REST and all about backend development.
|
2024-11-06 12:07:51 +00:00
|
|
|
httpie
|
|
|
|
httpie-desktop
|
2024-11-30 05:20:58 +00:00
|
|
|
hurl
|
|
|
|
grpcurl
|
|
|
|
|
|
|
|
# Testing out Kubernetes.
|
|
|
|
kind
|
2024-11-24 12:47:34 +00:00
|
|
|
|
|
|
|
# Testing out LLMs.
|
|
|
|
plandex
|
2024-01-01 05:56:10 +00:00
|
|
|
];
|
|
|
|
}
|
2023-12-18 00:58:34 +00:00
|
|
|
|
2024-02-27 11:45:14 +00:00
|
|
|
(lib.mkIf (!userCfg.programs.nixvim.enable) {
|
2024-02-04 14:20:30 +00:00
|
|
|
programs.neovim = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.neovim-nightly;
|
|
|
|
vimAlias = true;
|
|
|
|
vimdiffAlias = true;
|
|
|
|
|
|
|
|
withNodeJs = true;
|
|
|
|
withPython3 = true;
|
|
|
|
withRuby = true;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
|
2024-11-30 07:07:45 +00:00
|
|
|
(lib.mkIf userCfg.programs.browsers.firefox.enable {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
(lowPrio firefox-devedition)
|
|
|
|
];
|
|
|
|
})
|
|
|
|
|
2024-01-01 05:56:10 +00:00
|
|
|
(lib.mkIf userCfg.programs.git.enable {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
diffoscope # An oversized caffeine grinder.
|
|
|
|
meld # Make a terminal dweller melt.
|
|
|
|
];
|
2023-12-18 00:58:34 +00:00
|
|
|
|
2024-01-01 05:56:10 +00:00
|
|
|
programs.git.extraConfig = {
|
|
|
|
difftool.prompt = false;
|
|
|
|
diff.tool = "diffoscope";
|
|
|
|
diff.guitool = "meld";
|
2023-12-18 00:58:34 +00:00
|
|
|
|
2024-01-01 05:56:10 +00:00
|
|
|
# Yeah, let's use this oversized diff tool, shall we?
|
|
|
|
# Also, this config is based from this tip.
|
|
|
|
# https://lists.reproducible-builds.org/pipermail/diffoscope/2016-April/000193.html
|
|
|
|
difftool."diffoscope".cmd = ''
|
|
|
|
if [[ $LOCAL = /dev/null ]]; then diffoscope --new-file $REMOTE; else diffoscope $LOCAL $REMOTE; fi
|
|
|
|
'';
|
2023-12-18 00:58:34 +00:00
|
|
|
|
2024-01-01 05:56:10 +00:00
|
|
|
difftool."diffoscope-html".cmd = ''
|
|
|
|
if [[ $LOCAL = /dev/null ]]; then diffoscope --new-file $REMOTE --html - | cat; else diffoscope $LOCAL $REMOTE --html - | cat; fi
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
})
|
2023-12-23 10:39:08 +00:00
|
|
|
|
2024-01-01 05:56:10 +00:00
|
|
|
(lib.mkIf (userCfg.setups.desktop.enable && pkgs.stdenv.isLinux) {
|
2024-10-21 07:26:05 +00:00
|
|
|
home.packages = with pkgs;
|
|
|
|
[
|
|
|
|
d-spy # Some GNOME dev probably developed this.
|
|
|
|
];
|
2024-01-01 05:56:10 +00:00
|
|
|
})
|
|
|
|
]);
|
2023-12-18 00:58:34 +00:00
|
|
|
}
|