modules: system: put modules into folders
This commit is contained in:
parent
d5b09c48ef
commit
7bec7ae0f9
9 changed files with 6 additions and 6 deletions
36
modules/system/packages/default.nix
Normal file
36
modules/system/packages/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# Common packages
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.system.packages;
|
||||
in
|
||||
{
|
||||
options.my.system.packages = with lib; {
|
||||
enable = my.mkDisableOption "packages configuration";
|
||||
|
||||
allowUnfree = my.mkDisableOption "allow unfree packages";
|
||||
};
|
||||
|
||||
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…
Add table
Add a link
Reference in a new issue