init
This commit is contained in:
2025-08-04 15:37:38 +02:00
parent 3ae535f1b1
commit 703e3f8adf
57 changed files with 674 additions and 3283 deletions

74
profiles/base/default.nix Normal file
View File

@@ -0,0 +1,74 @@
{
agenix,
config,
pkgs,
lib,
user,
...
}:
{
imports = [
agenix.darwinModules.default
];
nixpkgs = {
config = {
allowUnfree = true;
allowBroken = true;
allowInsecure = false;
allowUnsupportedSystem = true;
};
overlays =
let
path = ../../overlays;
in
with builtins;
map (n: import (path + ("/" + n))) (
filter (n: match ".*\\.nix" n != null || pathExists (path + ("/" + n + "/default.nix"))) (
attrNames (readDir path)
)
);
};
nix = {
package = pkgs.nix;
settings = {
trusted-users = [
"@admin"
"${user}"
];
substituters = [
"https://nix-community.cachix.org"
"https://cache.nixos.org"
];
trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
};
gc = {
automatic = true;
interval = {
Weekday = 0;
Hour = 2;
Minute = 0;
};
options = "--delete-older-than 30d";
};
extraOptions = ''
experimental-features = nix-command flakes
'';
};
environment.systemPackages =
with pkgs;
[
agenix.packages."${pkgs.system}".default
]
++ (import ./packages.nix { inherit pkgs; });
programs.fish.enable = true;
system = {
primaryUser = user;
stateVersion = 5;
};
}

View File

@@ -0,0 +1,9 @@
{
programs.atuin = {
enable = true;
enableFishIntegration = true;
daemon = {
enable = true;
};
};
}

View File

@@ -0,0 +1,25 @@
{
pkgs,
...
}:
{
programs.bat = {
enable = true;
config = {
theme = "Catppuccin Latte";
pager = "ov";
};
themes = {
"Catppuccin Latte" = {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "6810349b28055dce54076712fc05fc68da4b8ec0";
sha256 = "lJapSgRVENTrbmpVyn+UQabC9fpV1G1e+CdlJ090uvg=";
};
file = "Themes/Catppuccin Latte.tmTheme";
};
};
};
}

View File

@@ -0,0 +1,6 @@
{
programs.eza = {
enable = true;
enableFishIntegration = true;
};
}

View File

@@ -0,0 +1,9 @@
{
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting # Disable greeting
set -gx LS_COLORS "$(vivid generate catppuccin-latte)"
'';
};
}

View File

@@ -0,0 +1,57 @@
{
pkgs,
...
}:
{
programs.ghostty = {
enable = true;
package = pkgs.ghostty-bin;
settings = {
command = "${pkgs.fish}/bin/fish";
theme = "catppuccin-latte";
window-padding-x = 8;
window-padding-y = 2;
window-padding-balance = true;
font-family = "Iosevka";
font-size = 15.5;
font-feature = [
"-calt"
"-dlig"
];
cursor-style = "block";
mouse-hide-while-typing = true;
mouse-scroll-multiplier = 1.25;
shell-integration = "detect";
shell-integration-features = "no-cursor";
keybind = [
"global:ctrl+shift+space=toggle_quick_terminal"
"shift+enter=text:\\n"
"ctrl+one=goto_tab:1"
"ctrl+two=goto_tab:2"
"ctrl+three=goto_tab:3"
"ctrl+four=goto_tab:4"
"ctrl+five=goto_tab:5"
"ctrl+six=goto_tab:6"
"ctrl+seven=goto_tab:7"
"ctrl+eight=goto_tab:8"
"ctrl+nine=goto_tab:9"
"ctrl+left=previous_tab"
"ctrl+right=next_tab"
"ctrl+h=previous_tab"
"ctrl+l=next_tab"
"ctrl+shift+left=goto_split:left"
"ctrl+shift+right=goto_split:right"
"ctrl+shift+h=goto_split:left"
"ctrl+shift+j=goto_split:down"
"ctrl+shift+k=goto_split:up"
"ctrl+shift+l=goto_split:right"
"ctrl+shift+enter=new_split:right"
"ctrl+t=new_tab"
"ctrl+w=close_tab"
"ctrl+shift+w=close_surface"
];
};
};
}

View File

@@ -0,0 +1,27 @@
{
...
}:
let
name = "Christoph Schmatzler";
in
{
programs.git = {
enable = true;
ignores = [ "*.swp" ];
userName = name;
lfs = {
enable = true;
};
extraConfig = {
init.defaultBranch = "main";
core = {
editor = "vim";
autocrlf = "input";
};
# commit.gpgsign = true;
pull.rebase = true;
rebase.autoStash = true;
};
};
}

View File

@@ -0,0 +1,5 @@
{
programs.jujutsu = {
enable = true;
};
}

View File

@@ -0,0 +1,25 @@
{
pkgs,
lib,
user,
...
}:
{
programs.ssh = {
enable = true;
includes = [
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux "/home/${user}/.ssh/config_external")
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin "/Users/${user}/.ssh/config_external")
];
matchBlocks = {
"github.com" = {
identitiesOnly = true;
identityFile = [
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux "/home/${user}/.ssh/id_ed25519")
(lib.mkIf pkgs.stdenv.hostPlatform.isDarwin "/Users/${user}/.ssh/id_ed25519")
];
};
};
};
}

View File

@@ -0,0 +1,66 @@
{
lib,
...
}:
{
programs.starship = {
enable = true;
enableFishIntegration = true;
settings = {
add_newline = true;
command_timeout = 750;
format = lib.concatStrings [
"$directory"
"$\{custom.jj\}"
"$line_break"
"$character"
];
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
custom.jj = {
ignore_timeout = true;
description = "The current jj status";
when = "jj root";
symbol = "🥋 ";
command = lib.concatStrings [
"jj log --revisions @ --no-graph --ignore-working-copy --color always --limit 1 --template '"
"separate(\" \","
" change_id.shortest(4),"
" bookmarks,"
" \"|\","
" concat("
" if(conflict, \"💥\"),"
" if(divergent, \"🚧\"),"
" if(hidden, \"👻\"),"
" if(immutable, \"🔒\"),"
" ),"
" raw_escape_sequence(\"\\x1b[1;32m\") ++ if(empty, \"(empty)\"),"
" raw_escape_sequence(\"\\x1b[1;32m\") ++ coalesce("
" truncate_end(29, description.first_line(), \"\"),"
" \"(no description set)\","
" ) ++ raw_escape_sequence(\"\\x1b[0m\"),"
")'"
];
};
git_state = {
disabled = true;
};
git_commit = {
disabled = true;
};
git_metrics = {
disabled = true;
};
git_branch = {
disabled = true;
};
};
};
}

View File

@@ -0,0 +1,6 @@
{
programs.zoxide = {
enable = true;
enableFishIntegration = true;
};
}

View File

@@ -0,0 +1,5 @@
{
programs.zsh = {
enable = true;
};
}

View File

@@ -0,0 +1,29 @@
{ pkgs }:
with pkgs;
[
age
age-plugin-yubikey
docker
docker-compose
git
gnupg
iosevka
jjui
jq
killall
libfido2
neovim
nixfmt
nodejs_24
opencode
openssh
ripgrep
sqlite
tree
unrar
unzip
vivid
wget
zip
]