Initial commit

This commit is contained in:
demenik
2025-12-01 18:24:34 +01:00
commit fc68fa5ce9
142 changed files with 6273 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
{
programs.zsh.shellAliases = {
v = "nvim";
c = "clear";
cp = "cp -riv";
"nix-shell" = "nix-shell --command zsh";
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
pkgs,
...
}: {
imports = [
./prompt.nix
./aliases.nix
./scripts.nix
];
home.sessionVariables."SHELL" = "${lib.getExe pkgs.zsh}";
programs.zsh = {
enable = true;
autosuggestion.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
initContent = ''
bindkey -e
export SHELL="${lib.getExe pkgs.zsh}"
'';
};
}

View File

@@ -0,0 +1,8 @@
{
programs.oh-my-posh = {
enable = true;
enableZshIntegration = true;
settings = builtins.fromTOML (builtins.readFile ./theme.omp.toml);
};
}

View File

@@ -0,0 +1,33 @@
{
pkgs,
dotsDir,
...
}: {
home.packages = with pkgs; [
(writeScriptBin "rebuild" ''
cd ${dotsDir}
git add -A 2>/dev/null
sudo nixos-rebuild $@ switch --flake .
cd - >/dev/null
'')
(writeScriptBin "update" ''
cd ${dotsDir}
git add -A 2>/dev/null
sudo nix flake $@ update
cd - >/dev/null
'')
(writeScriptBin "nix" ''
NIX=${pkgs.lib.getExe pkgs.nix}
if [[ $1 == "develop" || $1 == "shell" ]]; then
cmd=$1
shift
exec "$NIX" "$cmd" -c "$SHELL" "$@"
else
exec "$NIX" "$@"
fi
'')
];
}

View File

@@ -0,0 +1,72 @@
version = 3
final_space = true
[transient_prompt]
template = ' '
foreground = '#f9e2af'
background = 'transparent'
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
template = '{{ if .Root }}root{{ else }}{{ .UserName }}{{ end }}@{{ .HostName }} '
foreground = '#cba6f7'
type = 'session'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
[[blocks.segments]]
template = '{{ if ne .Type "unknown" }}󱄅 {{ end }}'
foreground = '#89b4fa'
type = 'nix-shell'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
[[blocks.segments]]
template = 'in'
foreground = '#585b70'
type = 'text'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
[[blocks.segments]]
foreground = '#89dceb'
type = 'path'
style = 'powerline'
[blocks.segments.properties]
cache_duration = 'none'
style = 'full'
[[blocks.segments]]
template = '{{if .UpstreamIcon}}{{ .UpstreamIcon }} {{end}}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }}'
foreground = '#585b70'
type = 'git'
style = 'plain'
[blocks.segments.properties]
fetch_upstream_icon = true
fetch_status = true
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
template = ''
foreground = '#f9e2af'
type = 'text'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'