made module categories

This commit is contained in:
Moritz Böhme 2021-09-14 20:55:50 +02:00
parent 8acff72cca
commit 7b5e0d34e7
30 changed files with 51 additions and 24 deletions

9
modules/cli/default.nix Normal file
View file

@ -0,0 +1,9 @@
{ config, lib, pkgs, ... }:
{
imports = [
./git.nix
./nix.nix
./zsh.nix
];
}

14
modules/cli/git.nix Normal file
View file

@ -0,0 +1,14 @@
{ config, lib, pkgs, ... }:
let
base = (home: {
programs.git = {
enable = true;
userName = "MoritzBoehme";
userEmail = "mr.x@moritzboeh.me";
};
});
in
{
home-manager.users.moritz = {...}: (base "/home/moritz");
}

8
modules/cli/nix.nix Normal file
View file

@ -0,0 +1,8 @@
{ config, lib, pkgs, ... }:
{
nix.package = pkgs.nixFlakes;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
}

38
modules/cli/zsh.nix Normal file
View file

@ -0,0 +1,38 @@
{ config, lib, pkgs, inputs, ... }:
let
base = (home: {
programs = {
zsh = {
enable = true;
dotDir = ".config/zsh";
history = {
expireDuplicatesFirst = true;
};
shellGlobalAliases = {
ls = "exa -lh";
cat = "bat";
};
plugins = [
{
name = "zsh-syntax-highlighting";
src = inputs.zsh-syntax-highlighting;
}
];
enableAutosuggestions = true;
enableCompletion = true;
};
exa.enable = true;
bat.enable = true;
starship = {
enable = true;
enableZshIntegration = true;
};
};
});
in
{
environment.pathsToLink = [ "/share/zsh" ];
home-manager.users.moritz = {...}: (base "/home/moritz");
}