nix/nixos/default.nix

137 lines
2.8 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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, ... }:
let
pkgsHomeManager = import <home-manager> {};
in
{
system.autoUpgrade.enable = true;
nix.optimise.automatic = true;
nix.gc.automatic = true;
nixpkgs.config.allowUnfree = true;
networking.useDHCP = false;
# for k3s
#networking.firewall.enable = true; # is already enabled ...
networking.firewall.allowedUDPPorts = [ 5355 ]; # LLMNR
services.openssh = {
enable = true;
openFirewall = true;
ports = [ 1512 ];
startWhenNeeded = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "without-password";
};
};
users.users.root.openssh.authorizedKeys.keys = [
"command=\"zrepl stdinserver fireStore\",restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM1U9DTKueKuTuu/F9wxGr3we7y00V8HMyUjVBMwFQwo root-zrepl@fireStore"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIOr9wE3i1+Cl/06WOf0/6OjxsOnN7veV3LZcWgtHkcS genofire@fireYoga"
];
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_IE.UTF-8";
i18n.supportedLocales = [
"en_US.UTF-8/UTF-8"
"en_IE.UTF-8/UTF-8"
];
console = {
font = "Lat2-Terminus16";
keyMap = "de";
};
environment.systemPackages = with pkgs; [
python3
killall
htop
bat
git
git-lfs
tig
helix
tcpdump
iperf3
bmon
figlet
tmux
xh
liboping
mtr
jq
unzip
unrar
## nice prompt together with grml
# pure-prompt
nushell
] ++ [
pkgsHomeManager.home-manager
];
environment.shellAliases = {
ip = "ip --color";
watch = "watch -c";
grep = "grep --color=always --exclude-dir=.git";
vim = "hx";
k9s = "k9s --headless";
};
environment.variables.EDITOR = "hx";
programs.mosh.enable = true; # open firewall
programs.neovim = {
enable = false;
defaultEditor = false;
configure.customRC = ''
syntax on
set number relativenumber
'';
};
# zsh
# users.defaultUserShell = pkgs.nushell;
users.defaultUserShell = pkgs.zsh;
programs.zsh = {
enable = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
# interactiveShellInit = ''
# promptInit = ''
# source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
# prompt pure;
# '';
# promptInit = "";
};
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"
];
};
};
};
imports = [
# tmux
./files/tmux.nix
];
}