2021-10-08 05:48:27 +02:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
|
|
|
|
|
|
|
|
{ config, pkgs, ... }:
|
2023-03-20 22:59:54 +01:00
|
|
|
|
let
|
|
|
|
|
pkgsHomeManager = import <home-manager> {};
|
|
|
|
|
in
|
2021-10-08 05:48:27 +02:00
|
|
|
|
{
|
2021-10-13 00:47:43 +02:00
|
|
|
|
system.autoUpgrade.enable = true;
|
2021-10-13 01:13:27 +02:00
|
|
|
|
nix.optimise.automatic = true;
|
|
|
|
|
nix.gc.automatic = true;
|
2021-11-13 23:14:42 +01:00
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2021-10-13 00:47:43 +02:00
|
|
|
|
|
|
|
|
|
networking.useDHCP = false;
|
2022-06-06 23:08:01 +02:00
|
|
|
|
# for k3s
|
|
|
|
|
#networking.firewall.enable = true; # is already enabled ...
|
2021-10-13 17:32:49 +02:00
|
|
|
|
networking.firewall.allowedUDPPorts = [ 5355 ]; # LLMNR
|
2021-10-13 00:47:43 +02:00
|
|
|
|
|
|
|
|
|
services.openssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
ports = [ 1512 ];
|
|
|
|
|
startWhenNeeded = true;
|
2023-03-20 22:59:54 +01:00
|
|
|
|
settings = {
|
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
|
KbdInteractiveAuthentication = false;
|
|
|
|
|
PermitRootLogin = "without-password";
|
|
|
|
|
};
|
2021-10-13 00:47:43 +02:00
|
|
|
|
};
|
|
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
2021-10-13 17:32:28 +02:00
|
|
|
|
"command=\"zrepl stdinserver fireStore\",restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM1U9DTKueKuTuu/F9wxGr3we7y00V8HMyUjVBMwFQwo root-zrepl@fireStore"
|
2022-07-23 08:49:55 +02:00
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIOr9wE3i1+Cl/06WOf0/6OjxsOnN7veV3LZcWgtHkcS genofire@fireYoga"
|
2021-10-13 00:47:43 +02:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Berlin";
|
|
|
|
|
i18n.defaultLocale = "en_IE.UTF-8";
|
2023-06-15 02:23:09 +02:00
|
|
|
|
i18n.supportedLocales = [
|
|
|
|
|
"en_US.UTF-8/UTF-8"
|
|
|
|
|
"en_IE.UTF-8/UTF-8"
|
|
|
|
|
];
|
2021-10-13 00:47:43 +02:00
|
|
|
|
console = {
|
|
|
|
|
font = "Lat2-Terminus16";
|
|
|
|
|
keyMap = "de";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
python3
|
|
|
|
|
killall
|
|
|
|
|
htop
|
2022-01-06 09:06:54 +01:00
|
|
|
|
bat
|
2021-10-13 00:47:43 +02:00
|
|
|
|
git
|
|
|
|
|
git-lfs
|
|
|
|
|
tig
|
2023-01-13 22:05:55 +01:00
|
|
|
|
helix
|
2021-10-27 16:19:38 +02:00
|
|
|
|
tcpdump
|
|
|
|
|
iperf3
|
2022-04-08 20:30:07 +02:00
|
|
|
|
bmon
|
2021-10-13 00:47:43 +02:00
|
|
|
|
figlet
|
|
|
|
|
tmux
|
|
|
|
|
xh
|
|
|
|
|
liboping
|
|
|
|
|
mtr
|
2021-10-15 01:11:05 +02:00
|
|
|
|
jq
|
2021-11-06 13:14:33 +01:00
|
|
|
|
unzip
|
|
|
|
|
unrar
|
2023-01-13 21:55:37 +01:00
|
|
|
|
## nice prompt together with grml
|
|
|
|
|
# pure-prompt
|
2023-01-13 22:12:04 +01:00
|
|
|
|
nushell
|
2023-03-20 22:59:54 +01:00
|
|
|
|
] ++ [
|
|
|
|
|
pkgsHomeManager.home-manager
|
2021-10-13 00:47:43 +02:00
|
|
|
|
];
|
2022-07-23 11:53:42 +02:00
|
|
|
|
environment.shellAliases = {
|
|
|
|
|
ip = "ip --color";
|
|
|
|
|
watch = "watch -c";
|
|
|
|
|
grep = "grep --color=always --exclude-dir=.git";
|
2023-01-13 22:05:55 +01:00
|
|
|
|
vim = "hx";
|
2023-01-13 22:12:04 +01:00
|
|
|
|
k9s = "k9s --headless";
|
2022-07-23 11:53:42 +02:00
|
|
|
|
};
|
2023-01-13 22:05:55 +01:00
|
|
|
|
environment.variables.EDITOR = "hx";
|
2022-07-23 11:53:42 +02:00
|
|
|
|
|
2021-10-15 19:33:20 +02:00
|
|
|
|
programs.mosh.enable = true; # open firewall
|
2021-10-13 00:47:43 +02:00
|
|
|
|
|
|
|
|
|
programs.neovim = {
|
2023-01-13 22:05:55 +01:00
|
|
|
|
enable = false;
|
|
|
|
|
defaultEditor = false;
|
2022-07-23 11:53:42 +02:00
|
|
|
|
configure.customRC = ''
|
|
|
|
|
syntax on
|
|
|
|
|
set number relativenumber
|
|
|
|
|
'';
|
2021-10-13 00:47:43 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# zsh
|
2023-01-13 22:12:04 +01:00
|
|
|
|
# users.defaultUserShell = pkgs.nushell;
|
2021-10-13 00:47:43 +02:00
|
|
|
|
users.defaultUserShell = pkgs.zsh;
|
2021-10-15 19:41:03 +02:00
|
|
|
|
programs.zsh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
autosuggestions.enable = true;
|
|
|
|
|
syntaxHighlighting.enable = true;
|
2022-07-05 22:38:53 +02:00
|
|
|
|
# interactiveShellInit = ''
|
2023-01-13 21:55:37 +01:00
|
|
|
|
# promptInit = ''
|
|
|
|
|
# source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
|
|
|
|
|
# prompt pure;
|
|
|
|
|
# '';
|
2022-07-05 22:38:53 +02:00
|
|
|
|
# promptInit = "";
|
2021-10-15 19:41:03 +02:00
|
|
|
|
};
|
2023-01-13 21:55:37 +01:00
|
|
|
|
programs.starship = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
|
|
|
|
directory ={
|
|
|
|
|
truncation_length = 0;
|
|
|
|
|
};
|
|
|
|
|
helm = {
|
|
|
|
|
disabled = true;
|
|
|
|
|
};
|
|
|
|
|
kubernetes = {
|
|
|
|
|
disabled = false;
|
|
|
|
|
format = "[$symbol$cluster( \($namespace\))]($style) in ";
|
|
|
|
|
detect_extensions = [
|
|
|
|
|
"package" # helm
|
|
|
|
|
];
|
|
|
|
|
detect_folders = [
|
|
|
|
|
"flux-system"
|
|
|
|
|
"helm"
|
|
|
|
|
"templates"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2021-10-15 19:50:54 +02:00
|
|
|
|
|
2023-03-20 22:59:54 +01:00
|
|
|
|
imports = [
|
|
|
|
|
# tmux
|
|
|
|
|
./files/tmux.nix
|
|
|
|
|
];
|
2021-10-08 05:48:27 +02:00
|
|
|
|
}
|
|
|
|
|
|