From 77a3a03daf76c033f984fc6f3193686ed2c9f31c Mon Sep 17 00:00:00 2001 From: halbg0tt Date: Fri, 3 Jul 2026 21:19:32 +0200 Subject: [PATCH] renamed mod -> modules in hosts->kepler | add /etc/nixos to git as safe dir --- flake.nix | 2 +- hosts/kepler/configuration.nix | 2 +- hosts/kepler/{mod => modules}/boot.nix | 0 hosts/kepler/{mod => modules}/default.nix | 1 + .../{mod => modules}/docker/default.nix | 0 .../{mod => modules}/docker/gluetun.nix | 0 .../{mod => modules}/docker/jdownloader.nix | 0 .../{mod => modules}/docker/qbittorrent.nix | 0 .../{mod => modules}/freedom/default.nix | 0 .../{mod => modules}/freedom/invidious.nix | 0 .../{mod => modules}/freedom/nitter.nix | 0 hosts/kepler/{mod => modules}/freedom/tor.nix | 0 .../{mod => modules}/freedom/unbound.nix | 0 hosts/kepler/{mod => modules}/git.nix | 0 hosts/kepler/{mod => modules}/gnupg.nix | 0 hosts/kepler/{mod => modules}/home/home.nix | 0 hosts/kepler/{mod => modules}/jellyfin.nix | 0 hosts/kepler/{mod => modules}/networking.nix | 0 hosts/kepler/{mod => modules}/pkgs.nix | 0 hosts/kepler/modules/shell.nix | 100 ++++++++++++++++++ hosts/kepler/{mod => modules}/ssh.nix | 0 hosts/kepler/{mod => modules}/system.nix | 0 hosts/kepler/{mod => modules}/time.nix | 0 hosts/kepler/{mod => modules}/users.nix | 0 24 files changed, 103 insertions(+), 2 deletions(-) rename hosts/kepler/{mod => modules}/boot.nix (100%) rename hosts/kepler/{mod => modules}/default.nix (93%) rename hosts/kepler/{mod => modules}/docker/default.nix (100%) rename hosts/kepler/{mod => modules}/docker/gluetun.nix (100%) rename hosts/kepler/{mod => modules}/docker/jdownloader.nix (100%) rename hosts/kepler/{mod => modules}/docker/qbittorrent.nix (100%) rename hosts/kepler/{mod => modules}/freedom/default.nix (100%) rename hosts/kepler/{mod => modules}/freedom/invidious.nix (100%) rename hosts/kepler/{mod => modules}/freedom/nitter.nix (100%) rename hosts/kepler/{mod => modules}/freedom/tor.nix (100%) rename hosts/kepler/{mod => modules}/freedom/unbound.nix (100%) rename hosts/kepler/{mod => modules}/git.nix (100%) rename hosts/kepler/{mod => modules}/gnupg.nix (100%) rename hosts/kepler/{mod => modules}/home/home.nix (100%) rename hosts/kepler/{mod => modules}/jellyfin.nix (100%) rename hosts/kepler/{mod => modules}/networking.nix (100%) rename hosts/kepler/{mod => modules}/pkgs.nix (100%) create mode 100644 hosts/kepler/modules/shell.nix rename hosts/kepler/{mod => modules}/ssh.nix (100%) rename hosts/kepler/{mod => modules}/system.nix (100%) rename hosts/kepler/{mod => modules}/time.nix (100%) rename hosts/kepler/{mod => modules}/users.nix (100%) diff --git a/flake.nix b/flake.nix index 31db19d..e0c4359 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,7 @@ useGlobalPkgs = true; useUserPackages = true; extraSpecialArgs = { inherit inputs; }; - users.user = ./hosts/kepler/mod/home/home.nix; + users.user = ./hosts/kepler/modules/home/home.nix; }; } ]; diff --git a/hosts/kepler/configuration.nix b/hosts/kepler/configuration.nix index cca7469..4eaca25 100644 --- a/hosts/kepler/configuration.nix +++ b/hosts/kepler/configuration.nix @@ -3,7 +3,7 @@ { imports = [ ./hardware-configuration.nix - ./mod/default.nix + ./modules/default.nix ]; time.timeZone = "Europe/Berlin"; diff --git a/hosts/kepler/mod/boot.nix b/hosts/kepler/modules/boot.nix similarity index 100% rename from hosts/kepler/mod/boot.nix rename to hosts/kepler/modules/boot.nix diff --git a/hosts/kepler/mod/default.nix b/hosts/kepler/modules/default.nix similarity index 93% rename from hosts/kepler/mod/default.nix rename to hosts/kepler/modules/default.nix index 8889bbb..debeabd 100644 --- a/hosts/kepler/mod/default.nix +++ b/hosts/kepler/modules/default.nix @@ -10,6 +10,7 @@ _: ./ssh.nix ./time.nix ./jellyfin.nix + ./shell.nix ./freedom/default.nix ./docker/default.nix ]; diff --git a/hosts/kepler/mod/docker/default.nix b/hosts/kepler/modules/docker/default.nix similarity index 100% rename from hosts/kepler/mod/docker/default.nix rename to hosts/kepler/modules/docker/default.nix diff --git a/hosts/kepler/mod/docker/gluetun.nix b/hosts/kepler/modules/docker/gluetun.nix similarity index 100% rename from hosts/kepler/mod/docker/gluetun.nix rename to hosts/kepler/modules/docker/gluetun.nix diff --git a/hosts/kepler/mod/docker/jdownloader.nix b/hosts/kepler/modules/docker/jdownloader.nix similarity index 100% rename from hosts/kepler/mod/docker/jdownloader.nix rename to hosts/kepler/modules/docker/jdownloader.nix diff --git a/hosts/kepler/mod/docker/qbittorrent.nix b/hosts/kepler/modules/docker/qbittorrent.nix similarity index 100% rename from hosts/kepler/mod/docker/qbittorrent.nix rename to hosts/kepler/modules/docker/qbittorrent.nix diff --git a/hosts/kepler/mod/freedom/default.nix b/hosts/kepler/modules/freedom/default.nix similarity index 100% rename from hosts/kepler/mod/freedom/default.nix rename to hosts/kepler/modules/freedom/default.nix diff --git a/hosts/kepler/mod/freedom/invidious.nix b/hosts/kepler/modules/freedom/invidious.nix similarity index 100% rename from hosts/kepler/mod/freedom/invidious.nix rename to hosts/kepler/modules/freedom/invidious.nix diff --git a/hosts/kepler/mod/freedom/nitter.nix b/hosts/kepler/modules/freedom/nitter.nix similarity index 100% rename from hosts/kepler/mod/freedom/nitter.nix rename to hosts/kepler/modules/freedom/nitter.nix diff --git a/hosts/kepler/mod/freedom/tor.nix b/hosts/kepler/modules/freedom/tor.nix similarity index 100% rename from hosts/kepler/mod/freedom/tor.nix rename to hosts/kepler/modules/freedom/tor.nix diff --git a/hosts/kepler/mod/freedom/unbound.nix b/hosts/kepler/modules/freedom/unbound.nix similarity index 100% rename from hosts/kepler/mod/freedom/unbound.nix rename to hosts/kepler/modules/freedom/unbound.nix diff --git a/hosts/kepler/mod/git.nix b/hosts/kepler/modules/git.nix similarity index 100% rename from hosts/kepler/mod/git.nix rename to hosts/kepler/modules/git.nix diff --git a/hosts/kepler/mod/gnupg.nix b/hosts/kepler/modules/gnupg.nix similarity index 100% rename from hosts/kepler/mod/gnupg.nix rename to hosts/kepler/modules/gnupg.nix diff --git a/hosts/kepler/mod/home/home.nix b/hosts/kepler/modules/home/home.nix similarity index 100% rename from hosts/kepler/mod/home/home.nix rename to hosts/kepler/modules/home/home.nix diff --git a/hosts/kepler/mod/jellyfin.nix b/hosts/kepler/modules/jellyfin.nix similarity index 100% rename from hosts/kepler/mod/jellyfin.nix rename to hosts/kepler/modules/jellyfin.nix diff --git a/hosts/kepler/mod/networking.nix b/hosts/kepler/modules/networking.nix similarity index 100% rename from hosts/kepler/mod/networking.nix rename to hosts/kepler/modules/networking.nix diff --git a/hosts/kepler/mod/pkgs.nix b/hosts/kepler/modules/pkgs.nix similarity index 100% rename from hosts/kepler/mod/pkgs.nix rename to hosts/kepler/modules/pkgs.nix diff --git a/hosts/kepler/modules/shell.nix b/hosts/kepler/modules/shell.nix new file mode 100644 index 0000000..a5db032 --- /dev/null +++ b/hosts/kepler/modules/shell.nix @@ -0,0 +1,100 @@ +{ config, pkgs, ... }: +{ + programs = { + bash = { + enable = true; + enableLsColors = true; + completion = { + enable = true; + package = pkgs.bash-completion; + }; + promptInit = '' + PS1="(\h) [\u:\$PWD] % " + ''; + shellAliases = { + "mount" = "doas mount --mkdir -v $@"; + "mkdir" = "mkdir -pv"; + "cp" = "cp -rv"; + "mv" = "mv -v $@"; + "rm" = "rm -v $@ -I"; + "ls" = "${pkgs.eza}/bin/eza --icons -l"; + "http" = "${pkgs.python3}/bin/python3 -m http.server 1337"; + "sudo" = "doas"; + "myip" = "curl -sSL icanhazip.com"; + "update" = "doas nixos-rebuild switch"; + "f" = "fastfetch"; + }; + }; + git = { + enable = true; + config = { + init = { + defaultBranch = "main"; + safe.directory = "/etc/nixos"; + }; + url = { + "https://github.com" = { + insteadOf = [ + "github:" + ]; + }; + }; + }; + }; + tmux = { + enable = true; + keyMode = "vi"; + aggressiveResize = true; + terminal = "tmux-256color"; + extraConfig = '' + unbind C-b + # unbind t + set -g prefix C-space + bind C-space send-prefix + + bind r source-file /etc/tmux.conf + + setw -g mode-keys vi + setw -g mouse on + + # make ctrl + arrow keys working + set -s extended-keys on + set -as terminal-features 'xterm*:extkeys' + set -g xterm-keys on + + bind-key -n S-Left select-pane -L + bind-key -n S-Down select-pane -D + bind-key -n S-Up select-pane -U + bind-key -n S-Right select-pane -R + + bind-key -n C-t new-window "#{pane_current_path}" + bind t new-window + + bind-key -n M-w previous-window + bind-key -n M-e next-window + + set -g base-index 1 + set -g renumber-windows on + + set-window-option -g clock-mode-colour colour196 + + set -g status-bg black + set -g status-fg white + set -g status-position bottom + set -g status-interval 1 + + set -g status-left-length 64 + set -g status-left "#[bg=colour196,fg=black,bold] [#S] #[bg=black,fg=colour196,nobold,noitalics,nounderscore] " + + set -g status-right-length 64 + set -g status-right "#[bg=black,fg=black]#[bg=black,fg=white] #{pane_title} #[bg=black,fg=colour196,bold]#[bg=colour196,fg=black,bold] %a %d %b  #[fg=black,bold]%H:%M:%S " + + set-window-option -g window-status-current-format "#[bg=colour196,fg=black,nobold,noitalics,nounderscore]#[bg=colour196,fg=black,bold] #I #[bg=colour196,fg=black,bold] #W#{?window_zoomed_flag,*Z,} #[bg=black,fg=colour196,nobold,noitalics,nounderscore]" + set-window-option -g window-status-format "#[bg=black,fg=black,noitalics]#[bg=black,fg=white] #I #[bg=black,fg=white] #W #[bg=black,fg=black,noitalics]" + + bind - split-window + bind \\ split-window -h + ''; + }; + }; +} diff --git a/hosts/kepler/mod/ssh.nix b/hosts/kepler/modules/ssh.nix similarity index 100% rename from hosts/kepler/mod/ssh.nix rename to hosts/kepler/modules/ssh.nix diff --git a/hosts/kepler/mod/system.nix b/hosts/kepler/modules/system.nix similarity index 100% rename from hosts/kepler/mod/system.nix rename to hosts/kepler/modules/system.nix diff --git a/hosts/kepler/mod/time.nix b/hosts/kepler/modules/time.nix similarity index 100% rename from hosts/kepler/mod/time.nix rename to hosts/kepler/modules/time.nix diff --git a/hosts/kepler/mod/users.nix b/hosts/kepler/modules/users.nix similarity index 100% rename from hosts/kepler/mod/users.nix rename to hosts/kepler/modules/users.nix