Modularize home config
This commit is contained in:
parent
3fd4640188
commit
f2e34e4c77
7 changed files with 88 additions and 147 deletions
10
homes/common/base.nix
Normal file
10
homes/common/base.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
programs.bash.enable = true;
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
}
|
||||
11
homes/common/default.nix
Normal file
11
homes/common/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
./user-info.nix
|
||||
./base.nix
|
||||
./editor.nix
|
||||
./vc.nix
|
||||
];
|
||||
|
||||
}
|
||||
9
homes/common/editor.nix
Normal file
9
homes/common/editor.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
|
||||
}
|
||||
18
homes/common/user-info.nix
Normal file
18
homes/common/user-info.nix
Normal 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
29
homes/common/vc.nix
Normal 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;
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue