nix-config/modules/TLMS/base.nix

99 lines
2.0 KiB
Nix
Raw Normal View History

2023-11-26 02:38:52 +01:00
{ pkgs, config, lib, registry, ... }:
2022-08-30 22:04:48 +02:00
let
regMotd = ''
_._ _,-'""`-._
(,-.`._,'( |\`-/| Be vewy vewy quiet!
`-.-' \ )-`( , o o) We're hunting tewegwams!
`- \`_`"'-
'';
prodMotd = ''
2022-09-27 01:01:20 +02:00
.-o=o-. <===== THIS IS FUCKING PROD YOU PLAYIN' WITH
, /=o=o=o=\ .--.
_|\|=o=O=o=O=| \
__.' a`\=o=o=o=(`\ /
'. a 4/`|.-""'`\ \ ;'`) .---.
\ .' / .--' |_.' / .-._)
`) _.' / /`-.__.' /
jgs `'-.____; /'-.___.-'
`"""`
'';
2022-08-30 22:04:48 +02:00
in
2022-04-23 03:01:58 +02:00
{
nix = {
2022-04-23 04:17:33 +02:00
package = pkgs.nixFlakes;
2022-04-23 03:01:58 +02:00
extraOptions = ''
2022-04-23 13:41:36 +02:00
'';
2022-12-31 16:28:38 +01:00
settings = {
auto-optimise-store = true;
experimental-features = "nix-command flakes";
2023-04-18 21:48:32 +02:00
};
2022-04-23 03:01:58 +02:00
};
networking.useNetworkd = true;
2023-11-26 02:38:52 +01:00
networking.hostName = registry.hostName;
2022-04-23 03:01:58 +02:00
console = {
font = "Lat2-Terminus16";
keyMap = "uk";
};
2022-06-06 19:46:15 +02:00
i18n.defaultLocale = "en_US.UTF-8";
i18n.supportedLocales = [
"en_US.UTF-8/UTF-8"
"en_US/ISO-8859-1"
"C.UTF-8/UTF-8"
];
2022-04-23 03:01:58 +02:00
environment.systemPackages = with pkgs; [
git
htop
tmux
2022-10-02 16:32:25 +02:00
screen
neovim
2022-04-23 03:01:58 +02:00
wget
git-crypt
2022-04-24 16:09:18 +02:00
iftop
2022-08-22 23:34:36 +02:00
tcpdump
dig
2022-08-30 19:39:44 +02:00
usbutils
rtl-sdr
hackrf
2024-04-28 02:08:26 +02:00
ssh-to-age
2022-04-23 03:01:58 +02:00
];
networking.firewall.enable = lib.mkDefault true;
networking.firewall.allowedTCPPorts = [ 22 ];
users.users.root = {
openssh.authorizedKeys.keyFiles = [
2023-03-05 14:07:31 +01:00
../../keys/ssh/revol-xut
../../keys/ssh/oxa
../../keys/ssh/oxa1
../../keys/ssh/marenz1
../../keys/ssh/marenz2
2023-04-28 22:37:27 +02:00
../../keys/ssh/marcel
];
};
2022-04-23 13:49:25 +02:00
services.openssh = {
enable = true;
2023-05-26 16:18:59 +02:00
settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = false;
2023-05-26 16:18:59 +02:00
};
2022-04-23 13:49:25 +02:00
};
2022-04-23 03:01:58 +02:00
programs.mosh.enable = true;
2022-08-30 22:04:48 +02:00
users.motd = if config.networking.hostName == "data-hoarder" then prodMotd else regMotd;
2022-07-13 22:56:38 +02:00
2022-10-02 16:32:25 +02:00
programs.screen.screenrc = ''
defscrollback 10000
startup_message off
hardstatus on
hardstatus alwayslastline
hardstatus string "%w"
'';
2022-04-23 03:01:58 +02:00
}