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
|
|
|
|
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; [
|
|
|
|
git
|
|
|
|
git-crypt
|
|
|
|
mosh
|
|
|
|
vim
|
|
|
|
wget
|
|
|
|
];
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
vim.defaultEditor = true; # Modal editing is life
|
|
|
|
|
|
|
|
zsh = {
|
|
|
|
enable = true; # Use integrations
|
|
|
|
# Disable global compinit when a user config exists
|
|
|
|
enableGlobalCompInit = !config.my.home.zsh.enable;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs.config = {
|
|
|
|
allowUnfree = cfg.allowUnfree; # Because I don't care *that* much.
|
|
|
|
};
|
|
|
|
};
|
2021-02-06 15:35:38 +01:00
|
|
|
}
|