2021-02-06 15:35:38 +01:00
|
|
|
# Common packages
|
2021-05-29 20:34:38 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.my.system.packages;
|
|
|
|
in
|
2021-02-06 15:35:38 +01:00
|
|
|
{
|
2021-05-29 20:34:38 +02:00
|
|
|
options.my.system.packages = with lib; {
|
|
|
|
enable = my.mkDisableOption "packages configuration";
|
2021-02-06 15:35:38 +01:00
|
|
|
|
2022-09-29 21:58:48 +02:00
|
|
|
allowAliases = mkEnableOption "allow package aliases";
|
|
|
|
|
2021-05-29 20:34:38 +02:00
|
|
|
allowUnfree = my.mkDisableOption "allow unfree packages";
|
2021-04-07 22:05:15 +02:00
|
|
|
};
|
2021-02-11 00:51:54 +01:00
|
|
|
|
2021-05-29 20:34:38 +02:00
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
wget
|
|
|
|
];
|
|
|
|
|
|
|
|
programs = {
|
2024-07-20 23:57:28 +02:00
|
|
|
vim = {
|
|
|
|
enable = true;
|
|
|
|
defaultEditor = true; # Modal editing is life
|
|
|
|
};
|
2021-05-29 20:34:38 +02:00
|
|
|
|
|
|
|
zsh = {
|
|
|
|
enable = true; # Use integrations
|
|
|
|
# Disable global compinit when a user config exists
|
|
|
|
enableGlobalCompInit = !config.my.home.zsh.enable;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs.config = {
|
2022-09-29 21:58:48 +02:00
|
|
|
inherit (cfg) allowAliases allowUnfree;
|
2021-05-29 20:34:38 +02:00
|
|
|
};
|
|
|
|
};
|
2021-02-06 15:35:38 +01:00
|
|
|
}
|