Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3199cabaa | ||
|
|
264f96f75e | ||
|
|
54a02e7f32 | ||
|
|
39942dd1ce | ||
|
|
7bf6ce7e8d | ||
|
|
dd97f9e2ba | ||
|
|
110f27fd9a | ||
|
|
7eb017eae3 | ||
|
|
44a5fc0064 | ||
|
|
5efb31d573 | ||
|
|
7836c3be3d | ||
|
|
ce0fb7cef7 | ||
|
|
cdf254a444 | ||
|
|
8f223fc83f | ||
|
|
b4606cc0f2 | ||
|
|
7a7cd06b18 | ||
|
|
507f2c35cd | ||
|
|
d480b9c328 | ||
|
|
6270603c97 | ||
|
|
248b962d5e | ||
|
|
5a2c51b9dc | ||
|
|
cb579d7097 | ||
|
|
01c41964bf |
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,3 +2,5 @@
|
||||
*.qcow2
|
||||
config/hardware-configuration.nix
|
||||
temp/*
|
||||
.claude
|
||||
hardware-configuration.nix
|
||||
|
||||
35
Makefile
Normal file
35
Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
MAKEFLAGS += --warn-undefined-variables
|
||||
SHELL := $(shell which bash)
|
||||
.EXPORT_ALL_VARIABLES:
|
||||
.ONESHELL:
|
||||
.SHELLFLAGS := -eu -o pipefail -c
|
||||
.SILENT:
|
||||
|
||||
|
||||
.PHONY: sync
|
||||
sync:
|
||||
sudo rsync -a --exclude='hardware-configuration.nix' nixos/ /etc/nixos/
|
||||
sudo nixos-rebuild switch
|
||||
|
||||
|
||||
.PHONY: sync-dry-run
|
||||
sync-dry-run:
|
||||
sudo rsync -a --dry-run --verbose --exclude='hardware-configuration.nix' nixos/ /etc/nixos/
|
||||
|
||||
|
||||
.PHONY: add-pre-commit-hook
|
||||
add-pre-commit-hook:
|
||||
printf '#!/bin/sh\nmake test\n' > .git/hooks/pre-commit
|
||||
chmod +x .git/hooks/pre-commit
|
||||
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
echo "Find nix files"
|
||||
find nixos -name "*.nix" | while read f; do
|
||||
echo "Checking $$f"
|
||||
nix-instantiate --parse "$$f" > /dev/null
|
||||
done
|
||||
echo "All files OK"
|
||||
|
||||
.DEFAULT_GOAL := test
|
||||
289
config/home.nix
289
config/home.nix
@ -1,289 +0,0 @@
|
||||
# In deiner home.nix
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
localScripts = import ./scripts.nix { inherit pkgs; };
|
||||
flakePackages = import ./flakes.nix {};
|
||||
in
|
||||
{
|
||||
home.stateVersion = "25.11";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Desktop-Anwendungen
|
||||
thunderbird
|
||||
vlc
|
||||
gimp
|
||||
filezilla
|
||||
solaar
|
||||
jameica
|
||||
|
||||
libreoffice-fresh
|
||||
hunspell
|
||||
hunspellDicts.de_DE
|
||||
|
||||
darktable
|
||||
kdePackages.kdenlive
|
||||
# davinci-resolve-studio
|
||||
|
||||
# Browser
|
||||
google-chrome
|
||||
|
||||
# Kommunikation
|
||||
signal-desktop
|
||||
|
||||
# Remote Desktop
|
||||
rustdesk-flutter
|
||||
|
||||
# Gaming
|
||||
lutris
|
||||
steam
|
||||
prismlauncher
|
||||
flakePackages.hytale-launcher
|
||||
|
||||
# Entwicklung
|
||||
jetbrains-toolbox
|
||||
mkcert
|
||||
gitflow
|
||||
|
||||
gnumake
|
||||
p7zip
|
||||
cacert
|
||||
|
||||
# Gnome extensions
|
||||
gnomeExtensions.appindicator
|
||||
gnomeExtensions.caffeine
|
||||
gnomeExtensions.dash-to-dock
|
||||
|
||||
# Aliases
|
||||
localScripts.composer
|
||||
localScripts.git-cleanup-local-branches
|
||||
localScripts.lazydocker
|
||||
];
|
||||
|
||||
# Powerlevel10k Theme installieren
|
||||
home.activation.installPowerlevel10k = config.lib.dag.entryAfter ["writeBoundary"] ''
|
||||
P10K_DIR="$HOME/.oh-my-zsh/custom/themes/powerlevel10k"
|
||||
if [ ! -d "$P10K_DIR" ]; then
|
||||
$DRY_RUN_CMD mkdir -p "$HOME/.oh-my-zsh/custom/themes"
|
||||
$DRY_RUN_CMD ${pkgs.git}/bin/git clone --depth=1 \
|
||||
https://github.com/romkatv/powerlevel10k.git "$P10K_DIR" || true
|
||||
fi
|
||||
'';
|
||||
|
||||
# mkcert installieren (für lokale SSL-Zertifikate)
|
||||
home.activation.setupMkcert = config.lib.dag.entryAfter ["writeBoundary"] ''
|
||||
if [ ! -f "$HOME/.local/share/mkcert/rootCA.pem" ]; then
|
||||
$DRY_RUN_CMD ${pkgs.mkcert}/bin/mkcert -install || true
|
||||
fi
|
||||
'';
|
||||
|
||||
home.shellAliases = {
|
||||
ll = "ls -lah";
|
||||
la = "ls -A";
|
||||
l = "ls -CF";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
rebuild = "sudo nixos-rebuild switch";
|
||||
update = "sudo nixos-rebuild switch --upgrade";
|
||||
c = "composer";
|
||||
lzd = "lazydocker";
|
||||
gclb = "git-cleanup-local-branches";
|
||||
ngc = "sudo nix-store --optimise && sudo nix-collect-garbage -d";
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
accent-color = "green";
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
button-layout = "appmenu:minimize,maximize,close";
|
||||
focus-mode = "sloppy";
|
||||
};
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
# Hier die IDs der Extensions eintragen
|
||||
enabled-extensions = with pkgs.gnomeExtensions; [
|
||||
appindicator.extensionUuid
|
||||
caffeine.extensionUuid
|
||||
dash-to-dock.extensionUuid
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/background" = {
|
||||
picture-uri = "file:///etc/nixos/config/crest_iv_black-cut.jpg";
|
||||
picture-uri-dark = "file:///etc/nixos/config/crest_iv_black-cut.jpg";
|
||||
picture-options = "centered";
|
||||
primary-color = "#000000";
|
||||
};
|
||||
"org/gnome/shell/extensions/dash-to-dock" = {
|
||||
show-mounts = false;
|
||||
show-trash = false;
|
||||
};
|
||||
"org/gnome/shell/keybindings" = {
|
||||
show-screenshot-ui = ["<Shift><Alt>5"];
|
||||
};
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
aliases = {
|
||||
prune = "fetch --prune";
|
||||
undo = "reset --soft HEAD^";
|
||||
stash-all = "stash save --include-untracked";
|
||||
graph = "log --graph --decorate --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'";
|
||||
};
|
||||
|
||||
apply.whitespace = "fix";
|
||||
|
||||
branch = {
|
||||
autosetuprebase = "remote";
|
||||
sort = "-authordate";
|
||||
};
|
||||
|
||||
"branch \"main\"" = {
|
||||
remote = "origin";
|
||||
merge = "refs/heads/main";
|
||||
rebase = true;
|
||||
};
|
||||
|
||||
color = {
|
||||
ui = "auto";
|
||||
branch = "auto";
|
||||
diff = "auto";
|
||||
status = "auto";
|
||||
interactive = "auto";
|
||||
pager = true;
|
||||
};
|
||||
|
||||
"color \"branch\"" = {
|
||||
current = "yellow reverse";
|
||||
local = "yellow";
|
||||
remote = "green";
|
||||
};
|
||||
|
||||
"color \"diff\"" = {
|
||||
meta = "yellow bold";
|
||||
frag = "magenta bold";
|
||||
old = "red bold";
|
||||
new = "green bold";
|
||||
whitespace = "red reverse";
|
||||
};
|
||||
|
||||
"color \"diff-highlight\"" = {
|
||||
oldNormal = "red bold";
|
||||
oldHighlight = "red bold 52";
|
||||
newNormal = "green bold";
|
||||
newHighlight = "green bold 22";
|
||||
};
|
||||
|
||||
"color \"status\"" = {
|
||||
added = "yellow";
|
||||
changed = "green";
|
||||
untracked = "cyan";
|
||||
};
|
||||
|
||||
core = {
|
||||
pager = "less -FRSX";
|
||||
whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
|
||||
editor = "vim";
|
||||
fileMode = false;
|
||||
autocrlf = "input";
|
||||
};
|
||||
|
||||
credential.helper = "cache";
|
||||
|
||||
diff.tool = "vimdiff";
|
||||
difftool.prompt = false;
|
||||
|
||||
fetch.prune = true;
|
||||
http.sslverify = false;
|
||||
|
||||
init.defaultBranch = "main";
|
||||
|
||||
merge.tool = "vimdiff";
|
||||
mergetool.prompt = false;
|
||||
|
||||
pull.rebase = false;
|
||||
|
||||
push = {
|
||||
default = "simple";
|
||||
followTags = true;
|
||||
};
|
||||
|
||||
rerere.enabled = 1;
|
||||
|
||||
status.showUntrackedFiles = "all";
|
||||
};
|
||||
|
||||
ignores = [
|
||||
".idea" # JetBrains IDEs
|
||||
];
|
||||
};
|
||||
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
settings = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
expandtab = true;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
syntax on
|
||||
set encoding=utf-8
|
||||
set autoindent
|
||||
set smartindent
|
||||
'';
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "powerlevel10k/powerlevel10k";
|
||||
plugins = [
|
||||
"command-not-found"
|
||||
"common-aliases"
|
||||
"docker"
|
||||
"docker-compose"
|
||||
"git"
|
||||
"git-prompt"
|
||||
"git-flow-avh"
|
||||
"ssh-agent"
|
||||
"systemd"
|
||||
"sudo"
|
||||
"rsync"
|
||||
];
|
||||
|
||||
custom = "$HOME/.oh-my-zsh/custom";
|
||||
};
|
||||
|
||||
initContent = ''
|
||||
# Bell deaktivieren
|
||||
unsetopt BEEP
|
||||
|
||||
# Powerlevel10k Konfiguration laden (falls vorhanden)
|
||||
[[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh
|
||||
'';
|
||||
};
|
||||
home.file.".p10k.zsh".source = ./config/p10k.zsh;
|
||||
|
||||
# GTK Theme (optional, für besseres Aussehen)
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
};
|
||||
}
|
||||
18
nixos/cesium.nix
Normal file
18
nixos/cesium.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
open = false;
|
||||
nvidiaPersistenced = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
networking.hostName = "cesium";
|
||||
networking.firewall.allowedTCPPorts = [ 9003 ];
|
||||
}
|
||||
@ -6,13 +6,17 @@
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.kernelModules = [ "hidp" ];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.settings.Policy.ReconnectAttempts = 0;
|
||||
|
||||
# System-Tuning für JetBrains Tools
|
||||
boot.kernel.sysctl = {
|
||||
"fs.inotify.max_user_watches" = 1048576;
|
||||
};
|
||||
|
||||
# Network
|
||||
networking.hostName = "cesium"; # Define your hostname.
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
@ -50,7 +54,7 @@
|
||||
cifs-utils
|
||||
];
|
||||
|
||||
# Shell-Programme
|
||||
# Shell-programms
|
||||
programs.zsh.enable = true;
|
||||
programs.git.enable = true;
|
||||
|
||||
@ -65,21 +69,24 @@
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# 32-bit Support für Steam
|
||||
# 32-bit Support for Steam
|
||||
hardware.graphics.enable32Bit = true;
|
||||
services.pulseaudio.support32Bit = true;
|
||||
|
||||
# Desktop Environment / Window Manager
|
||||
services.xserver.enable = true;
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.displayManager.gdm.autoSuspend = false;
|
||||
services.desktopManager.gnome.enable = true;
|
||||
|
||||
services.logind.settings.Login.HandleSuspendKey = "ignore";
|
||||
services.logind.settings.Login.IdleAction = "ignore";
|
||||
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
# Standard GNOME Apps die du nicht brauchst
|
||||
gnome-photos
|
||||
gnome-tour
|
||||
gnome-weather # <- Wetter
|
||||
# gnome-maps # <- Karten
|
||||
gnome-weather
|
||||
# gnome-maps
|
||||
gnome-music
|
||||
gnome-contacts
|
||||
gnome-calendar
|
||||
@ -107,7 +114,7 @@
|
||||
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
allowReboot = true;
|
||||
allowReboot = false;
|
||||
channel = "https://channels.nixos.org/nixos-25.11";
|
||||
};
|
||||
|
||||
|
Before Width: | Height: | Size: 968 KiB After Width: | Height: | Size: 968 KiB |
87
nixos/config/zsh-custom.zsh
Normal file
87
nixos/config/zsh-custom.zsh
Normal file
@ -0,0 +1,87 @@
|
||||
function cdWeb() {
|
||||
cd "/mnt/data/projects/$1" || exit
|
||||
}
|
||||
alias www=cdWeb
|
||||
|
||||
#compdef typo3
|
||||
|
||||
# This file is part of the Symfony package.
|
||||
#
|
||||
# (c) Fabien Potencier <fabien@symfony.com>
|
||||
#
|
||||
# For the full copyright and license information, please view
|
||||
# https://symfony.com/doc/current/contributing/code/license.html
|
||||
|
||||
#
|
||||
# zsh completions for typo3
|
||||
#
|
||||
# References:
|
||||
# - https://github.com/spf13/cobra/blob/master/zsh_completions.go
|
||||
# - https://github.com/symfony/symfony/blob/5.4/src/Symfony/Component/Console/Resources/completion.bash
|
||||
#
|
||||
_sf_typo3() {
|
||||
local lastParam flagPrefix requestComp out comp
|
||||
local -a completions
|
||||
|
||||
# The user could have moved the cursor backwards on the command-line.
|
||||
# We need to trigger completion from the $CURRENT location, so we need
|
||||
# to truncate the command-line ($words) up to the $CURRENT location.
|
||||
# (We cannot use $CURSOR as its value does not work when a command is an alias.)
|
||||
words=("${=words[1,CURRENT]}") lastParam=${words[-1]}
|
||||
|
||||
# For zsh, when completing a flag with an = (e.g., typo3 -n=<TAB>)
|
||||
# completions must be prefixed with the flag
|
||||
setopt local_options BASH_REMATCH
|
||||
if [[ "${lastParam}" =~ '-.*=' ]]; then
|
||||
# We are dealing with a flag with an =
|
||||
flagPrefix="-P ${BASH_REMATCH}"
|
||||
fi
|
||||
|
||||
# Prepare the command to obtain completions
|
||||
requestComp="${words[0]} ${words[1]} _complete --no-interaction -szsh -a1 -c$((CURRENT-1))" i=""
|
||||
for w in ${words[@]}; do
|
||||
w=$(printf -- '%b' "$w")
|
||||
# remove quotes from typed values
|
||||
quote="${w:0:1}"
|
||||
if [ "$quote" = \' ]; then
|
||||
w="${w%\'}"
|
||||
w="${w#\'}"
|
||||
elif [ "$quote" = \" ]; then
|
||||
w="${w%\"}"
|
||||
w="${w#\"}"
|
||||
fi
|
||||
# empty values are ignored
|
||||
if [ ! -z "$w" ]; then
|
||||
i="${i}-i${w} "
|
||||
fi
|
||||
done
|
||||
|
||||
# Ensure at least 1 input
|
||||
if [ "${i}" = "" ]; then
|
||||
requestComp="${requestComp} -i\" \""
|
||||
else
|
||||
requestComp="${requestComp} ${i}"
|
||||
fi
|
||||
|
||||
# Use eval to handle any environment variables and such
|
||||
out=$(eval ${requestComp} 2>/dev/null)
|
||||
|
||||
while IFS='\n' read -r comp; do
|
||||
if [ -n "$comp" ]; then
|
||||
# If requested, completions are returned with a description.
|
||||
# The description is preceded by a TAB character.
|
||||
# For zsh's _describe, we need to use a : instead of a TAB.
|
||||
# We first need to escape any : as part of the completion itself.
|
||||
comp=${comp//:/\\:}
|
||||
local tab=$(printf '\t')
|
||||
comp=${comp//$tab/:}
|
||||
completions+=${comp}
|
||||
fi
|
||||
done < <(printf "%s\n" "${out[@]}")
|
||||
|
||||
# Let inbuilt _describe handle completions
|
||||
eval _describe "completions" completions $flagPrefix
|
||||
return $?
|
||||
}
|
||||
|
||||
compdef _sf_typo3 typo3
|
||||
@ -4,11 +4,11 @@
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./cesium.nix
|
||||
./common.nix
|
||||
./mounts.nix
|
||||
./services.nix
|
||||
./users/sebastian.nix
|
||||
# ./vm-guest.nix
|
||||
<home-manager/nixos>
|
||||
];
|
||||
|
||||
54
nixos/dconf.nix
Normal file
54
nixos/dconf.nix
Normal file
@ -0,0 +1,54 @@
|
||||
# In deiner home.nix
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
accent-color = "green";
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
audible-bell = false;
|
||||
button-layout = "appmenu:minimize,maximize,close";
|
||||
focus-mode = "click";
|
||||
raise-on-click = true;
|
||||
};
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
# Hier die IDs der Extensions eintragen
|
||||
enabled-extensions = with pkgs.gnomeExtensions; [
|
||||
appindicator.extensionUuid
|
||||
caffeine.extensionUuid
|
||||
dash-to-dock.extensionUuid
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/background" = {
|
||||
picture-uri = "file:///etc/nixos/config/crest_iv_black-cut.jpg";
|
||||
picture-uri-dark = "file:///etc/nixos/config/crest_iv_black-cut.jpg";
|
||||
picture-options = "centered";
|
||||
primary-color = "#000000";
|
||||
};
|
||||
"org/gnome/shell/extensions/dash-to-dock" = {
|
||||
show-mounts = false;
|
||||
show-trash = false;
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/power" = {
|
||||
power-button-action = "interactive";
|
||||
sleep-inactive-ac-timeout = 0;
|
||||
sleep-inactive-ac-type = "nothing";
|
||||
};
|
||||
"org/gnome/shell/keybindings" = {
|
||||
show-screenshot-ui = ["<Shift><Alt>5"];
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = [
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||
];
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||
name = "Console";
|
||||
command = "kgx";
|
||||
binding = "<Control><Alt>t";
|
||||
};
|
||||
};
|
||||
}
|
||||
147
nixos/home.nix
Normal file
147
nixos/home.nix
Normal file
@ -0,0 +1,147 @@
|
||||
# In deiner home.nix
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
localScripts = import ./scripts.nix { inherit pkgs; };
|
||||
flakePackages = import ./flakes.nix {};
|
||||
in
|
||||
{
|
||||
home.stateVersion = "25.11";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Desktop-Anwendungen
|
||||
thunderbird
|
||||
vlc
|
||||
gimp
|
||||
filezilla
|
||||
solaar
|
||||
jameica
|
||||
|
||||
libreoffice-fresh
|
||||
hunspell
|
||||
hunspellDicts.de_DE
|
||||
|
||||
darktable
|
||||
kdePackages.kdenlive
|
||||
davinci-resolve-studio
|
||||
|
||||
# Browser
|
||||
(pkgs.google-chrome.override { commandLineArgs = "--password-store=basic"; })
|
||||
|
||||
# Kommunikation
|
||||
signal-desktop
|
||||
|
||||
# Remote Desktop
|
||||
rustdesk-flutter
|
||||
|
||||
# Gaming
|
||||
lutris
|
||||
steam
|
||||
prismlauncher
|
||||
#flakePackages.hytale-launcher
|
||||
|
||||
# Entwicklung
|
||||
jetbrains-toolbox
|
||||
mkcert
|
||||
nssTools
|
||||
gitflow
|
||||
claude-code
|
||||
gnomeExtensions.claude-code-usage-indicator
|
||||
|
||||
gnumake
|
||||
p7zip
|
||||
cacert
|
||||
|
||||
# Gnome extensions
|
||||
gnomeExtensions.appindicator
|
||||
gnomeExtensions.caffeine
|
||||
gnomeExtensions.dash-to-dock
|
||||
|
||||
# Aliases
|
||||
localScripts.composer
|
||||
localScripts.git-cleanup-local-branches
|
||||
localScripts.lazydocker
|
||||
];
|
||||
|
||||
# Powerlevel10k Theme installieren
|
||||
home.activation.installPowerlevel10k = config.lib.dag.entryAfter ["writeBoundary"] ''
|
||||
P10K_DIR="$HOME/.oh-my-zsh/custom/themes/powerlevel10k"
|
||||
if [ ! -d "$P10K_DIR" ]; then
|
||||
$DRY_RUN_CMD mkdir -p "$HOME/.oh-my-zsh/custom/themes"
|
||||
$DRY_RUN_CMD ${pkgs.git}/bin/git clone --depth=1 \
|
||||
https://github.com/romkatv/powerlevel10k.git "$P10K_DIR" || true
|
||||
fi
|
||||
'';
|
||||
|
||||
# mkcert installieren (für lokale SSL-Zertifikate)
|
||||
home.activation.setupMkcert = config.lib.dag.entryAfter ["writeBoundary"] ''
|
||||
if [ ! -f "$HOME/.local/share/mkcert/rootCA.pem" ]; then
|
||||
$DRY_RUN_CMD ${pkgs.mkcert}/bin/mkcert -install || true
|
||||
fi
|
||||
'';
|
||||
|
||||
home.shellAliases = {
|
||||
ll = "ls -lah";
|
||||
la = "ls -A";
|
||||
l = "ls -CF";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
rebuild = "sudo nixos-rebuild switch";
|
||||
update = "sudo nixos-rebuild switch --upgrade";
|
||||
c = "composer";
|
||||
lzd = "lazydocker";
|
||||
gclb = "git-cleanup-local-branches";
|
||||
ngc = "sudo nix-store --optimise && sudo nix-collect-garbage -d";
|
||||
t3docrun = "source <(docker run --rm t3docs/render-documentation show-shell-commands)";
|
||||
t3docmake = "dockrun_t3rd makehtml";
|
||||
t3docopen = ''xdg-open "file:///$(pwd)/Documentation-GENERATED-temp/Result/project/0.0.0/Index.html"'';
|
||||
t3docclean = "rm -rf Documentation-GENERATED-temp/";
|
||||
t3doc = "t3docrun && t3docmake && t3docopen";
|
||||
};
|
||||
|
||||
home.file.".gitignore_global".text = ''
|
||||
.idea
|
||||
'';
|
||||
|
||||
home.file.".p10k.zsh".source = ./config/p10k.zsh;
|
||||
home.file.".oh-my-zsh/custom/custom.zsh".source = ./config/zsh-custom.zsh;
|
||||
|
||||
home.file.".profile".text = ''
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
|
||||
home.file.".ssh" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "/mnt/data/.ssh";
|
||||
recursive = false;
|
||||
};
|
||||
|
||||
home.file.".steam" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "/mnt/data/Steam";
|
||||
recursive = false;
|
||||
};
|
||||
|
||||
home.file.".thunderbird" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink "/mnt/data/Thunderbird";
|
||||
recursive = false;
|
||||
};
|
||||
|
||||
home.sessionPath = [
|
||||
"${config.home.homeDirectory}/.local/bin"
|
||||
"${config.home.homeDirectory}/bin"
|
||||
"${config.home.homeDirectory}/.composer/vendor/bin"
|
||||
"${config.home.homeDirectory}/.local/share/JetBrains/Toolbox/scripts"
|
||||
];
|
||||
|
||||
# GTK Theme (optional, für besseres Aussehen)
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "adw-gtk3-dark";
|
||||
package = pkgs.adw-gtk3;
|
||||
};
|
||||
};
|
||||
}
|
||||
175
nixos/programs.nix
Normal file
175
nixos/programs.nix
Normal file
@ -0,0 +1,175 @@
|
||||
# In deiner home.nix
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
aliases = {
|
||||
# Because I constantly forget how to do this
|
||||
# https://git-scm.com/docs/git-fetch#git-fetch--p
|
||||
prune = "fetch --prune";
|
||||
# Not quite as common as an amend, but still common
|
||||
# https://git-scm.com/docs/git-reset#git-reset-emgitresetemltmodegtltcommitgt
|
||||
undo = "reset --soft HEAD^";
|
||||
# We wanna grab those pesky un-added files!
|
||||
# https://git-scm.com/docs/git-stash
|
||||
stash-all = "stash save --include-untracked";
|
||||
# No need for a GUI - a nice, colorful, graphical representation
|
||||
# https://git-scm.com/docs/git-log
|
||||
# via https://medium.com/@payload.dd/thanks-for-the-git-st-i-will-use-this-4da5839a21a4
|
||||
graph = "log --graph --decorate --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'";
|
||||
};
|
||||
|
||||
apply.whitespace = "fix";
|
||||
|
||||
branch = {
|
||||
autosetuprebase = "remote";
|
||||
sort = "-authordate";
|
||||
};
|
||||
|
||||
"branch \"main\"" = {
|
||||
remote = "origin";
|
||||
merge = "refs/heads/main";
|
||||
rebase = true;
|
||||
};
|
||||
|
||||
color = {
|
||||
ui = "auto";
|
||||
branch = "auto";
|
||||
diff = "auto";
|
||||
status = "auto";
|
||||
interactive = "auto";
|
||||
pager = true;
|
||||
};
|
||||
|
||||
"color \"branch\"" = {
|
||||
current = "yellow reverse";
|
||||
local = "yellow";
|
||||
remote = "green";
|
||||
};
|
||||
|
||||
"color \"diff\"" = {
|
||||
meta = "yellow bold";
|
||||
frag = "magenta bold";
|
||||
old = "red bold";
|
||||
new = "green bold";
|
||||
whitespace = "red reverse";
|
||||
};
|
||||
|
||||
"color \"diff-highlight\"" = {
|
||||
oldNormal = "red bold";
|
||||
oldHighlight = "red bold 52";
|
||||
newNormal = "green bold";
|
||||
newHighlight = "green bold 22";
|
||||
};
|
||||
|
||||
"color \"status\"" = {
|
||||
added = "yellow";
|
||||
changed = "green";
|
||||
untracked = "cyan";
|
||||
};
|
||||
|
||||
core = {
|
||||
pager = "less -FRSX";
|
||||
whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
|
||||
editor = "vim";
|
||||
fileMode = false;
|
||||
autocrlf = "input";
|
||||
};
|
||||
|
||||
credential.helper = "cache";
|
||||
|
||||
diff.tool = "vimdiff";
|
||||
difftool.prompt = false;
|
||||
|
||||
fetch.prune = true;
|
||||
http.sslverify = false;
|
||||
|
||||
include.path = "~/.gitconfig_override";
|
||||
|
||||
init.defaultBranch = "main";
|
||||
|
||||
merge.tool = "vimdiff";
|
||||
mergetool.prompt = false;
|
||||
|
||||
pull.rebase = false;
|
||||
|
||||
push = {
|
||||
# "push the current branch back to the branch whose changes are usually integrated into the current branch"
|
||||
# "refuse to push if the upstream branch’s name is different from the local one"
|
||||
# https://git-scm.com/docs/git-config#git-config-pushdefault
|
||||
default = "simple";
|
||||
# Because I get sick of telling git to do it manually
|
||||
# https://git-scm.com/docs/git-config#git-config-pushfollowTags
|
||||
followTags = true;
|
||||
};
|
||||
|
||||
rerere.enabled = 1;
|
||||
|
||||
# Sometimes a newly-added folder, since it's only one line in git status, can slip under the radar.
|
||||
# https://git-scm.com/docs/git-config#git-config-statusshowUntrackedFiles
|
||||
status.showUntrackedFiles = "all";
|
||||
};
|
||||
|
||||
ignores = [
|
||||
".idea" # JetBrains IDEs
|
||||
];
|
||||
};
|
||||
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
settings = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
expandtab = true;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
syntax on
|
||||
set encoding=utf-8
|
||||
set autoindent
|
||||
set smartindent
|
||||
'';
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "powerlevel10k/powerlevel10k";
|
||||
plugins = [
|
||||
"command-not-found"
|
||||
"common-aliases"
|
||||
"docker"
|
||||
"docker-compose"
|
||||
"git"
|
||||
"git-prompt"
|
||||
"git-flow-avh"
|
||||
"ssh-agent"
|
||||
"systemd"
|
||||
"sudo"
|
||||
"rsync"
|
||||
];
|
||||
|
||||
custom = "$HOME/.oh-my-zsh/custom";
|
||||
};
|
||||
|
||||
initContent = ''
|
||||
# Bell deaktivieren
|
||||
unsetopt BEEP
|
||||
|
||||
# Powerlevel10k Konfiguration laden (falls vorhanden)
|
||||
[[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh
|
||||
'';
|
||||
};
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
# /etc/nixos/sebastian.nix
|
||||
# /etc/nixos/users/sebastian.nix
|
||||
# Benutzer-Konfiguration
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
@ -24,12 +24,14 @@
|
||||
|
||||
home-manager.users.sebastian = lib.mkMerge [
|
||||
(import ../home.nix)
|
||||
(import ../dconf.nix)
|
||||
(import ../programs.nix)
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
settings = {
|
||||
user.name = "Sebastian Fischer"; # ANPASSEN
|
||||
user.email = "typo3@evoweb.de"; # ANPASSEN
|
||||
user.name = "Sebastian Fischer";
|
||||
user.email = "typo3@evoweb.de";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user