Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
Harald Hoyer 2024-11-19 10:31:29 +01:00
parent a3187e163d
commit 900f95169f
83 changed files with 1134 additions and 705 deletions

View file

@ -1,7 +1,8 @@
{ lib
, config
, pkgs
, ...
{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkIf;
@ -14,9 +15,7 @@ in
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
bashInteractive
];
home.packages = with pkgs; [ bashInteractive ];
programs.bash = {
enable = true;
initExtra = ''

View file

@ -1,10 +1,12 @@
{ lib
, config
, pkgs
, ...
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.metacfg; let
with lib.metacfg;
let
cfg = config.metacfg.cli-apps.bat;
in
{
@ -16,7 +18,12 @@ in
programs.bat = {
enable = true;
config.theme = "ansi";
extraPackages = with pkgs.bat-extras; [ batdiff batman batgrep batwatch ];
extraPackages = with pkgs.bat-extras; [
batdiff
batman
batgrep
batwatch
];
};
};
}

View file

@ -1,7 +1,8 @@
{ lib
, config
, pkgs
, ...
{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkIf;
@ -33,15 +34,17 @@ in
end
'';
plugins = [{
name = "foreign-env";
src = pkgs.fetchFromGitHub {
owner = "oh-my-fish";
repo = "plugin-foreign-env";
rev = "dddd9213272a0ab848d474d0cbde12ad034e65bc";
sha256 = "00xqlyl3lffc5l0viin1nyp819wf81fncqyz87jx8ljjdhilmgbs";
};
}];
plugins = [
{
name = "foreign-env";
src = pkgs.fetchFromGitHub {
owner = "oh-my-fish";
repo = "plugin-foreign-env";
rev = "dddd9213272a0ab848d474d0cbde12ad034e65bc";
sha256 = "00xqlyl3lffc5l0viin1nyp819wf81fncqyz87jx8ljjdhilmgbs";
};
}
];
# shellInit =
# ''

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkIf;
@ -24,8 +29,6 @@ in
man = "${pkgs.bat-extras.batman}/bin/batman";
};
home.packages = with pkgs; [
vim
];
home.packages = with pkgs; [ vim ];
};
}

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkIf;
@ -199,7 +204,10 @@ in
nix = 110;
ruby = 120;
java = 130;
go = [ 90 130 ];
go = [
90
130
];
};
};
};
@ -223,7 +231,10 @@ in
comment-nvim.enable = true;
};
vim.spellChecking.languages = [ "en" "de" ];
vim.spellChecking.languages = [
"en"
"de"
];
};
};
};

View file

@ -1,7 +1,8 @@
{ lib
, config
, pkgs
, ...
{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkIf;
@ -15,16 +16,22 @@ in
config = mkIf cfg.enable {
home.packages = with pkgs; [
(pkgs.nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono" ]; })
(pkgs.nerdfonts.override {
fonts = [
"FiraCode"
"DroidSansMono"
"JetBrainsMono"
];
})
];
programs.starship = {
enable = true;
settings = {
container.format = "[\\[$name\\]]($style) ";
git_status = {
ahead = "$\{count}";
diverged = "$\{ahead_count}$\{behind_count}";
behind = "$\{count}";
ahead = "\${count}";
diverged = "\${ahead_count}\${behind_count}";
behind = "\${count}";
};
};
};

View file

@ -1,10 +1,12 @@
{ lib
, config
, pkgs
, ...
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.metacfg; let
with lib.metacfg;
let
cfg = config.metacfg.cli-apps.tmux;
in
{
@ -12,9 +14,5 @@ in
enable = mkEnableOption "Tmux";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
tmux
];
};
config = mkIf cfg.enable { home.packages = with pkgs; [ tmux ]; };
}

View file

@ -1,4 +1,11 @@
{ lib, config, pkgs, host ? null, format ? "unknown", ... }:
{
lib,
config,
pkgs,
host ? null,
format ? "unknown",
...
}:
let
inherit (lib) types;

View file

@ -1,7 +1,8 @@
{ lib
, config
, pkgs
, ...
{
lib,
config,
pkgs,
...
}:
let
inherit (lib) mkEnableOption mkIf;
@ -16,7 +17,13 @@ in
config = mkIf cfg.enable {
home.packages = with pkgs; [
alacritty
(pkgs.nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono" ]; })
(pkgs.nerdfonts.override {
fonts = [
"FiraCode"
"DroidSansMono"
"JetBrainsMono"
];
})
];
};
}

View file

@ -1,8 +1,15 @@
{ options, config, lib, pkgs, ... }:
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.metacfg;
let cfg = config.metacfg.tools.direnv;
let
cfg = config.metacfg.tools.direnv;
in
{
options.metacfg.tools.direnv = with types; {

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
let
inherit (lib) types mkEnableOption mkIf;
@ -13,7 +18,8 @@ in
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 "7F3D64824AC0B6B8009E50504BC0896FB5693595" "The key ID to sign commits with.";
mkOpt types.str "7F3D64824AC0B6B8009E50504BC0896FB5693595"
"The key ID to sign commits with.";
signByDefault = mkOpt types.bool false "Whether to sign commits by default.";
};
@ -32,10 +38,18 @@ in
inherit (cfg) signByDefault;
};
extraConfig = {
init = { defaultBranch = "main"; };
pull = { rebase = true; };
push = { autoSetupRemote = true; };
core = { whitespace = "trailing-space,space-before-tab"; };
init = {
defaultBranch = "main";
};
pull = {
rebase = true;
};
push = {
autoSetupRemote = true;
};
core = {
whitespace = "trailing-space,space-before-tab";
};
safe = {
directory = "${user.home}/git";
};

View file

@ -1,8 +1,15 @@
{ options, config, lib, pkgs, ... }:
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.metacfg;
let cfg = config.metacfg.tools.jetbrains;
let
cfg = config.metacfg.tools.jetbrains;
in
{
options.metacfg.tools.jetbrains = with types; {
@ -10,12 +17,16 @@ in
};
config = mkIf cfg.enable {
home.sessionPath = [
"$HOME/.local/share/JetBrains/Toolbox/scripts"
];
home.sessionPath = [ "$HOME/.local/share/JetBrains/Toolbox/scripts" ];
home.packages = with pkgs; [
jetbrains-toolbox
(pkgs.nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono" ]; })
(pkgs.nerdfonts.override {
fonts = [
"FiraCode"
"DroidSansMono"
"JetBrainsMono"
];
})
];
};
}

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
let
inherit (lib) types mkEnableOption mkIf;
@ -10,9 +15,7 @@ in
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
mosh
];
home.packages = with pkgs; [ mosh ];
programs.ssh = {
enable = true;
extraConfig = ''

View file

@ -1,7 +1,18 @@
{ lib, config, pkgs, osConfig ? { }, ... }:
{
lib,
config,
pkgs,
osConfig ? { },
...
}:
let
inherit (lib) types mkIf mkDefault mkMerge;
inherit (lib)
types
mkIf
mkDefault
mkMerge
;
inherit (lib.metacfg) mkOpt;
cfg = config.metacfg.user;