move git to home

This commit is contained in:
Tristan 2024-01-05 21:03:25 +00:00
parent f893e3b8e2
commit 2fe0f94a23
4 changed files with 22 additions and 42 deletions

View file

@ -29,10 +29,14 @@ let
in {
imports = [
./graphical.nix
../../lib/scripts.nix
../../lib/programs/home/neovim/.
../../lib/programs/home/git.nix
../../lib/modules/home/terminal.nix
../../lib/modules/home/scripts.nix
../../lib/scripts.nix
../../lib/modules/home/email.nix
../../lib/modules/home/editor.nix
../../lib/modules/home/mpd.nix

View file

@ -28,13 +28,13 @@ nixpkgs.lib.nixosSystem {
}
{
imports = [
(import ./modules/gamer.nix {inherit user;})
(import ./modules/keyboard.nix {inherit user;})
(import ./modules/display.nix {inherit user;})
(import ./modules/work.nix {inherit user;})
(import ./modules/git.nix {inherit user userName;})
(import ./modules/laptop.nix {inherit user;})
(import ./modules/personal.nix {inherit user;})
(import ./modules/gamer.nix {inherit user;})
(import ./programs/hyprland.nix {inherit user;})
(import ../hardware/${name}.nix {inherit user;})
(import ../global/system.nix user)
@ -48,7 +48,6 @@ nixpkgs.lib.nixosSystem {
];
roles.work.enable = work;
roles.git.enable = true;
roles.personal.enable = !work;
}
];

View file

@ -1,38 +0,0 @@
{
user,
userName,
}: {
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.roles.git;
in {
options.roles = {
git = {
enable = mkEnableOption "email settings";
};
};
config = mkIf cfg.enable {
home-manager.users.${user}.imports = [
{
programs.git = {
enable = true;
aliases = {
graph = "log --oneline --all --graph";
amend = "commit --amend --no-edit";
};
delta = {
enable = true;
};
extraConfig = {
pull.rebase = true;
};
};
}
];
};
}

15
lib/programs/home/git.nix Normal file
View file

@ -0,0 +1,15 @@
{
programs.git = {
enable = true;
aliases = {
graph = "log --oneline --all --graph";
amend = "commit --amend --no-edit";
};
delta = {
enable = true;
};
extraConfig = {
pull.rebase = true;
};
};
}