refactor
This commit is contained in:
parent
66c05f9093
commit
45d6f4b0f3
205 changed files with 9040 additions and 342 deletions
18
modules/home/tools/direnv/default.nix
Normal file
18
modules/home/tools/direnv/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.tools.direnv;
|
||||
in
|
||||
{
|
||||
options.plusultra.tools.direnv = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable direnv.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv = enabled;
|
||||
};
|
||||
};
|
||||
}
|
40
modules/home/tools/git/default.nix
Normal file
40
modules/home/tools/git/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) types mkEnableOption mkIf;
|
||||
inherit (lib.plusultra) mkOpt enabled;
|
||||
|
||||
cfg = config.plusultra.tools.git;
|
||||
user = config.plusultra.user;
|
||||
in
|
||||
{
|
||||
options.plusultra.tools.git = {
|
||||
enable = mkEnableOption "Git";
|
||||
userName = mkOpt types.str user.fullName "The name to configure git with.";
|
||||
userEmail = mkOpt types.str user.email "The email to configure git with.";
|
||||
signingKey =
|
||||
mkOpt types.str "9762169A1B35EA68" "The key ID to sign commits with.";
|
||||
signByDefault = mkOpt types.bool true "Whether to sign commits by default.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
inherit (cfg) userName userEmail;
|
||||
lfs = enabled;
|
||||
signing = {
|
||||
key = cfg.signingKey;
|
||||
inherit (cfg) signByDefault;
|
||||
};
|
||||
extraConfig = {
|
||||
init = { defaultBranch = "main"; };
|
||||
pull = { rebase = true; };
|
||||
push = { autoSetupRemote = true; };
|
||||
core = { whitespace = "trailing-space,space-before-tab"; };
|
||||
safe = {
|
||||
directory = "${user.home}/work/config";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
21
modules/home/tools/jetbrains/default.nix
Normal file
21
modules/home/tools/jetbrains/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.tools.jetbrains;
|
||||
in
|
||||
{
|
||||
options.plusultra.tools.jetbrains = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable jetbrains.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.sessionPath = [
|
||||
"$HOME/.local/share/JetBrains/Toolbox/scripts"
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
jetbrains-toolbox
|
||||
(pkgs.nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono" ]; })
|
||||
];
|
||||
};
|
||||
}
|
20
modules/home/tools/ssh/default.nix
Normal file
20
modules/home/tools/ssh/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) types mkEnableOption mkIf;
|
||||
cfg = config.plusultra.tools.ssh;
|
||||
in
|
||||
{
|
||||
options.plusultra.tools.ssh = {
|
||||
enable = mkEnableOption "SSH";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.ssh = {
|
||||
extraConfig = ''
|
||||
Host *
|
||||
HostKeyAlgorithms +ssh-rsa
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue