nix-config/modules/TLMS/base.nix

103 lines
2.2 KiB
Nix
Raw Normal View History

{ pkgs, config, self, lib, ... }:
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 = ''
experimental-features = nix-command flakes
2022-04-23 13:41:36 +02:00
'';
2022-04-28 20:01:49 +02:00
autoOptimiseStore = true;
2022-04-23 03:01:58 +02:00
};
networking.useNetworkd = true;
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
(vim_configurable.override {
guiSupport = false;
luaSupport = false;
perlSupport = false;
pythonSupport = false;
rubySupport = false;
cscopeSupport = false;
netbeansSupport = false;
})
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
2022-04-23 03:01:58 +02:00
];
networking.firewall.enable = lib.mkDefault true;
networking.firewall.allowedTCPPorts = [ 22 ];
users.users.root = {
openssh.authorizedKeys.keyFiles = [
"${self}/keys/ssh/revol-xut"
"${self}/keys/ssh/oxa"
"${self}/keys/ssh/oxa1"
"${self}/keys/ssh/marenz1"
"${self}/keys/ssh/marenz2"
"${self}/keys/ssh/astro"
];
};
2022-04-23 13:49:25 +02:00
services.openssh = {
enable = true;
permitRootLogin = "prohibit-password";
passwordAuthentication = false;
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-12-30 18:29:13 +01:00
TLMS.stopsJson = "${pkgs.stops}/stop/all.json";
TLMS.graphJson = "${pkgs.stops}/graph/all.json";
2022-04-23 03:01:58 +02:00
}