2023-10-13 00:28:39 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-01-23 17:30:09 +01:00
|
|
|
{
|
|
|
|
imports =
|
|
|
|
[
|
|
|
|
# Include the results of the hardware scan.
|
|
|
|
./hardware-configuration.nix
|
2023-10-17 10:39:14 +02:00
|
|
|
# ./modules/adguard
|
2023-01-23 23:35:44 +01:00
|
|
|
./modules/networks
|
2023-10-28 15:51:25 +02:00
|
|
|
# ./modules/backup
|
2023-10-29 11:58:56 +01:00
|
|
|
./modules/grafana
|
|
|
|
./modules/prometheus
|
2023-10-17 10:39:14 +02:00
|
|
|
./modules/matrix
|
2023-01-24 12:05:09 +01:00
|
|
|
./modules/nextcloud
|
2023-10-15 16:30:40 +02:00
|
|
|
./modules/seafile
|
2023-07-15 11:54:30 +02:00
|
|
|
./modules/uptime-kuma
|
2023-01-25 14:24:10 +01:00
|
|
|
./modules/vaultwarden
|
2023-01-24 12:05:09 +01:00
|
|
|
./modules/nginx
|
2023-01-23 17:30:09 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
loader.systemd-boot.enable = true;
|
|
|
|
loader.efi.canTouchEfiVariables = true;
|
2023-04-16 13:43:30 +02:00
|
|
|
tmp.useTmpfs = true;
|
2023-01-23 17:30:09 +01:00
|
|
|
};
|
2023-02-17 21:35:12 +01:00
|
|
|
services.btrfs.autoScrub.enable = true;
|
2023-06-12 16:49:45 +02:00
|
|
|
|
|
|
|
sops.secrets."store/secretkey" = { };
|
|
|
|
nix.extraOptions = ''
|
|
|
|
secret-key-files = ${config.sops.secrets."store/secretkey".path}
|
|
|
|
'';
|
|
|
|
|
2023-05-30 20:36:52 +02:00
|
|
|
environment.persistence."/nix/persist/system" = {
|
|
|
|
directories = [
|
|
|
|
"/etc/ssh"
|
2023-08-06 22:24:01 +02:00
|
|
|
"/root/.borgmatic"
|
2023-06-08 10:16:06 +02:00
|
|
|
"/root/.local/share/zsh"
|
2023-07-30 19:41:51 +02:00
|
|
|
"/root/.config/borg/security"
|
2023-05-30 20:36:52 +02:00
|
|
|
];
|
|
|
|
files = [
|
|
|
|
"/etc/machine-id"
|
|
|
|
];
|
|
|
|
};
|
2023-05-30 21:15:01 +02:00
|
|
|
# impermanence fixes
|
|
|
|
sops.age.sshKeyPaths = lib.mkForce [ "/nix/persist/system/etc/ssh/ssh_host_ed25519_key" ];
|
|
|
|
sops.gnupg.sshKeyPaths = lib.mkForce [ ];
|
2023-01-23 17:30:09 +01:00
|
|
|
|
|
|
|
time.timeZone = "Europe/Berlin";
|
|
|
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
console = {
|
|
|
|
keyMap = "dvorak";
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
vim
|
|
|
|
wget
|
2023-01-28 22:28:56 +01:00
|
|
|
htop-vim
|
2023-10-13 00:28:39 +02:00
|
|
|
helix
|
2023-05-28 13:15:29 +02:00
|
|
|
lsof
|
2023-06-19 10:37:17 +02:00
|
|
|
btdu
|
2023-01-23 17:30:09 +01:00
|
|
|
];
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
config = {
|
|
|
|
user.name = "Rouven Seifert";
|
|
|
|
user.email = "rouven@rfive.de";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable the OpenSSH daemon.
|
|
|
|
services.openssh.enable = true;
|
2023-06-03 21:42:12 +02:00
|
|
|
security = {
|
|
|
|
audit.enable = true;
|
|
|
|
auditd.enable = true;
|
|
|
|
};
|
|
|
|
|
2023-04-17 11:16:50 +02:00
|
|
|
|
|
|
|
# firmware updates
|
|
|
|
services.fwupd.enable = true;
|
2023-05-30 20:46:59 +02:00
|
|
|
users.users.root.initialHashedPassword = "$y$j9T$hYM7FT2hn3O7OWBn9uz8e0$XquxONcPSke6YjdRGwOzGxC0/92hgP7PIB0y0K.Qdr/";
|
2023-01-23 17:30:09 +01:00
|
|
|
users.users.root.openssh.authorizedKeys.keyFiles = [
|
|
|
|
../../keys/ssh/rouven-thinkpad
|
2023-06-12 16:49:45 +02:00
|
|
|
../../keys/ssh/root-thinkpad
|
2023-01-23 17:30:09 +01:00
|
|
|
../../keys/ssh/rouven-pixel
|
2023-07-30 19:41:51 +02:00
|
|
|
../../keys/ssh/root-falkenstein
|
2023-01-23 17:30:09 +01:00
|
|
|
];
|
|
|
|
|
2023-04-06 22:31:45 +02:00
|
|
|
system.stateVersion = "22.11";
|
2023-01-23 17:30:09 +01:00
|
|
|
|
|
|
|
}
|