summaryrefslogtreecommitdiff
path: root/home.nix
diff options
context:
space:
mode:
authorChristoph Cullmann <christoph@cullmann.io>2024-06-27 20:37:20 +0200
committerChristoph Cullmann <christoph@cullmann.io>2024-06-27 20:37:20 +0200
commit5fb5fe1f6bf072f00ef760c85f11cf0955ed86e9 (patch)
tree06f74a3bc98eb4932744e9a7ac53fbceea4932f6 /home.nix
parentac27521d022b5402c15d389bf0ec1515b52638bd (diff)
separate the settings
Diffstat (limited to 'home.nix')
-rw-r--r--home.nix62
1 files changed, 62 insertions, 0 deletions
diff --git a/home.nix b/home.nix
new file mode 100644
index 0000000..8b2eb73
--- /dev/null
+++ b/home.nix
@@ -0,0 +1,62 @@
+{
+ # initial version
+ home.stateVersion = "22.11";
+
+ # ZSH with some nice prompt and extra main user configuration
+ programs.zsh = {
+ # zsh with extras wanted
+ enable = true;
+ enableCompletion = true;
+ autosuggestion.enable = true;
+ history.share = false;
+ syntaxHighlighting.enable = true;
+
+ # aliases
+ shellAliases = {
+ # system build/update/cleanup
+ update = "sudo TMPDIR=/var/cache/nix nixos-rebuild boot";
+ upgrade = "sudo TMPDIR=/var/cache/nix nixos-rebuild boot --upgrade";
+ updatenow = "sudo TMPDIR=/var/cache/nix nixos-rebuild switch";
+ upgradenow = "sudo TMPDIR=/var/cache/nix nixos-rebuild switch --upgrade";
+ gc = "sudo nix-collect-garbage --delete-older-than 7d";
+ verify = "sudo nix --extra-experimental-features nix-command store verify --all";
+ optimize = "sudo nix --extra-experimental-features nix-command store optimise";
+
+ # overwrite some tools
+ cat = "bat";
+ ls = "lsd";
+
+ # ssh around in the local network
+ mac = "ssh mac.fritz.box";
+ macroot = "ssh root@mac.fritz.box";
+ mini = "ssh mini.fritz.box";
+ miniroot = "ssh root@mini.fritz.box";
+ neko = "ssh neko.fritz.box";
+ nekoroot = "ssh root@neko.fritz.box";
+ };
+ };
+
+ # nice prompt
+ programs.oh-my-posh = {
+ enable = true;
+ useTheme = "slim";
+ };
+
+ # nice cd
+ programs.zoxide = {
+ enable = true;
+ options = [ "--cmd" "cd" ];
+ };
+
+ # enable keychain, we use the main user key
+ programs.keychain = {
+ enable = true;
+ keys = [ "/home/cullmann/.ssh/id_ed25519" ];
+ };
+
+ # https://github.com/nix-community/nix-direnv
+ programs.direnv = {
+ enable = true;
+ nix-direnv.enable = true;
+ };
+}