2022-08-16 14:20:36 +02:00
|
|
|
{ pkgs, config, ... }: {
|
2022-04-10 13:59:39 +02:00
|
|
|
nix = {
|
|
|
|
package = pkgs.nixUnstable; # or versioned attributes like nix_2_4
|
|
|
|
extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
2022-09-06 17:16:31 +02:00
|
|
|
};
|
2022-04-10 13:59:39 +02:00
|
|
|
|
2023-07-29 17:09:01 +02:00
|
|
|
system.activationScripts.report-nixos-changes = ''
|
|
|
|
if [ -e /run/current-system ] && [ -e $systemConfig ]; then
|
|
|
|
echo System package diff:
|
|
|
|
${config.nix.package}/bin/nix store diff-closures /run/current-system $systemConfig || true
|
|
|
|
fi
|
2024-02-29 12:03:02 +01:00
|
|
|
|
|
|
|
NO_FORMAT="\033[0m"
|
|
|
|
F_BOLD="\033[1m"
|
|
|
|
C_RED="\033[38;5;9m"
|
|
|
|
${pkgs.diffutils}/bin/cmp --silent \
|
|
|
|
<(readlink /run/booted-system/{initrd,kernel,kernel-modules}) \
|
|
|
|
<(readlink /run/current-system/{initrd,kernel,kernel-modules}) \
|
|
|
|
|| echo -e "''${F_BOLD}''${C_RED}Kernel version changed, reboot is advised.''${NO_FORMAT}"
|
2023-07-29 17:09:01 +02:00
|
|
|
'';
|
|
|
|
|
2021-11-17 11:39:34 +01:00
|
|
|
# Select internationalisation properties.
|
|
|
|
console = {
|
|
|
|
#font = "Lat2-Terminus16";
|
|
|
|
font = "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
|
|
|
|
keyMap = pkgs.lib.mkForce "uk";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable the OpenSSH daemon.
|
|
|
|
services.openssh.enable = true;
|
2023-11-13 14:20:18 +01:00
|
|
|
programs.mosh.enable = true;
|
2021-11-17 11:39:34 +01:00
|
|
|
|
2024-01-01 17:21:33 +01:00
|
|
|
# vs code server
|
|
|
|
services.vscode-server.enable = true;
|
|
|
|
|
2021-11-17 11:39:34 +01:00
|
|
|
# set root ssh keys
|
|
|
|
users.users.root.openssh.authorizedKeys = {
|
|
|
|
keys = [
|
|
|
|
# RSA keys go into keyFiles because they're shamefully long
|
2023-08-14 11:31:18 +02:00
|
|
|
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPS8xkNH7JvKblekx5oel4HVKCz3uBbQYEaR9Z9nzTAr manuel@ifsr.de"
|
2021-11-17 11:39:34 +01:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINogGKyXieCXQvVTa1z3ArS1TlqcVl2sSqvMpOjQo/Um jakob@krbs.me"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICjNYNRBsY/Dc+/XOaGDui9tRa4VGPsHwYo3irGnMRbR felix@tycho"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdOcXORg+akeN2t3yZlKWdoTURKxtV29eQ7UrIMkCHv felix@entropy"
|
2023-08-14 11:31:18 +02:00
|
|
|
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH73n+ZfJqNzIh9rPh6JYQaI4OAw9WKkPeqj2XRFmRfQ pascal@ifsr.de"
|
2021-11-17 11:39:34 +01:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAmb1kv+7HU1QKE53+gNxUhrggbwomC40Xjxd9hACkoo bennofs@d-cube"
|
2022-11-11 15:37:17 +01:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA0X6L7NwTHiOmFzo8mJBCy6H+DKUePAAXU4amm32DAQ fugi@arch"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHD1ZkrAmC9g5eJPDgv4zuEM+UIIEWromDzM1ltHt4TM fugi@macbook"
|
2023-08-14 11:31:18 +02:00
|
|
|
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICBtP2ltExnQL5llOvfSKp6OCZKbPWsa2s6P0i00XyrH helene_emilia.hausmann@mailbox.tu-dresden.de"
|
|
|
|
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEXMHwy4AZ9B4pMRBa/P/rb7N3SCas9e7Lp89plTHdFS halcyon@eisvogel.moe"
|
|
|
|
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAJ7qUGZUjiDhQ6Se+aXr9DbgRTG2tx69owqVMkd2bna simon@mayushii"
|
2023-09-06 12:22:42 +02:00
|
|
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBLlITzcTVnSi8EpEW3leSuqYCDhbnJyoGCjFOtIJ0Dl5uRNm0UNXS7AbQtLLylEeI1+/qinQDEWAJ6cBDAaPfNw= rouven@thinkpad"
|
|
|
|
|
2021-11-17 11:39:34 +01:00
|
|
|
];
|
|
|
|
keyFiles = [
|
2022-11-05 11:44:53 +01:00
|
|
|
../keys/ssh/marcus-sapphire
|
|
|
|
../keys/ssh/schrader
|
|
|
|
../keys/ssh/jannusch
|
|
|
|
../keys/ssh/jannusch-arch
|
|
|
|
../keys/ssh/tassilo
|
|
|
|
../keys/ssh/jonasga
|
2022-11-11 16:24:48 +01:00
|
|
|
../keys/ssh/rouven
|
2022-11-18 17:15:22 +01:00
|
|
|
../keys/ssh/joachim
|
2021-11-17 11:39:34 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-04-10 13:59:39 +02:00
|
|
|
time.timeZone = "Europe/Berlin";
|
2021-11-17 11:39:34 +01:00
|
|
|
|
|
|
|
# basic shell & editor
|
|
|
|
programs.vim.defaultEditor = true;
|
|
|
|
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
# $ nix search wget
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
atop
|
2023-10-20 21:38:28 +02:00
|
|
|
btop
|
2021-11-17 11:39:34 +01:00
|
|
|
bat
|
|
|
|
git
|
|
|
|
htop
|
2022-10-01 14:30:18 +02:00
|
|
|
fd
|
2021-11-17 11:39:34 +01:00
|
|
|
ripgrep
|
|
|
|
tldr
|
|
|
|
tmux
|
|
|
|
usbutils
|
|
|
|
wget
|
2022-03-05 15:02:17 +01:00
|
|
|
neovim
|
2023-09-19 10:33:03 +02:00
|
|
|
helix
|
2022-10-01 14:30:18 +02:00
|
|
|
nmap
|
|
|
|
tcpdump
|
|
|
|
bat
|
2022-11-18 17:51:09 +01:00
|
|
|
dig
|
|
|
|
ethtool
|
|
|
|
iftop
|
2022-11-11 16:41:15 +01:00
|
|
|
ipcalc
|
|
|
|
iperf3
|
|
|
|
ipv6calc
|
|
|
|
lsof
|
|
|
|
ltrace
|
|
|
|
strace
|
|
|
|
mtr
|
|
|
|
traceroute
|
|
|
|
smartmontools
|
|
|
|
sysstat
|
|
|
|
tree
|
|
|
|
whois
|
2023-12-14 15:42:10 +01:00
|
|
|
eza
|
2022-11-18 17:51:09 +01:00
|
|
|
zsh
|
2023-12-15 16:03:17 +01:00
|
|
|
unzip
|
2021-11-17 11:39:34 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|