Modularize home config

This commit is contained in:
Julien Hémono 2025-11-23 12:07:42 +01:00
parent 3fd4640188
commit f2e34e4c77
7 changed files with 88 additions and 147 deletions

10
homes/common/base.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
programs.bash.enable = true;
programs.fish = {
enable = true;
};
}

11
homes/common/default.nix Normal file
View file

@ -0,0 +1,11 @@
{ ... }:
{
imports = [
./user-info.nix
./base.nix
./editor.nix
./vc.nix
];
}

9
homes/common/editor.nix Normal file
View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
programs.helix = {
enable = true;
defaultEditor = true;
};
}

View file

@ -0,0 +1,18 @@
{ lib, ... }:
{
options.user.info = {
name = lib.mkOption {
type = lib.types.str;
};
email = lib.mkOption {
type = lib.types.str;
};
};
config.user.info = {
name = lib.mkDefault "Julien Hémono";
email = lib.mkDefault "julien@hemono.fr";
};
}

29
homes/common/vc.nix Normal file
View file

@ -0,0 +1,29 @@
{ config, pkgs, ... }:
{
programs.git = {
enable = true;
settings = {
user = {
email = config.user.info.email;
name = config.user.info.name;
};
};
};
programs.jujutsu = {
enable = true;
settings = {
user = {
email = config.user.info.email;
name = config.user.info.name;
};
ui.default-command = "log";
};
};
programs.gh = {
enable = true;
};
}