modules: system: packages: make it configurable
This commit is contained in:
parent
7916a26a58
commit
c23d89dcb2
|
@ -1,23 +1,36 @@
|
||||||
# Common packages
|
# Common packages
|
||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.my.system.packages;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# List packages installed in system profile. To search, run:
|
options.my.system.packages = with lib; {
|
||||||
# $ nix search wget
|
enable = my.mkDisableOption "packages configuration";
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
git
|
|
||||||
git-crypt
|
|
||||||
mosh
|
|
||||||
vim
|
|
||||||
wget
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.vim.defaultEditor = true; # Modal editing is life
|
allowUnfree = my.mkDisableOption "allow unfree packages";
|
||||||
programs.zsh = {
|
|
||||||
enable = true; # Use integrations
|
|
||||||
# Disable global compinit when a user config exists
|
|
||||||
enableGlobalCompInit = !config.my.home.zsh.enable;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true; # Because I don't care *that* much.
|
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.
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue