feat: newton depreciation

This commit is contained in:
Julien Malka 2023-04-09 00:14:00 +02:00
parent 55de10dc3e
commit 27ff8f4b33
Signed by: Luj
GPG key ID: 6FC74C847011FD83
3 changed files with 0 additions and 167 deletions

View file

@ -1,66 +0,0 @@
{ config, pkgs, lib, modulesPath, ... }:
let
hostName = "newton";
in
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
./hardware.nix
./home-julien.nix
../../users/julien.nix
../../users/default.nix
];
luj = {
filerun = {
enable = true;
subdomain = "cloud";
};
paperless = {
enable = true;
nginx.enable = true;
nginx.subdomain = "papers";
};
zfs-mails.enable = true;
zfs-mails.name = hostName;
zfs-mails.smart.enable = true;
};
networking.hostName = hostName;
networking.hostId = "f7cdfbc9";
networking.interfaces.enp2s0f0.useDHCP = true;
networking.interfaces.enp2s0f1.useDHCP = true;
services.fail2ban.enable = true;
services.zfs.autoSnapshot.enable = true;
services.zfs.autoScrub.enable = true;
environment.systemPackages = [ pkgs.tailscale ];
# enable the tailscale service
services.tailscale.enable = true;
networking.nameservers = [ "100.127.245.71" "9.9.9.9" ];
environment.etc."resolv.conf" = with lib; with pkgs; {
source = writeText "resolv.conf" ''
${concatStringsSep "\n" (map (ns: "nameserver ${ns}") config.networking.nameservers)}
options edns0
'';
};
services.openssh.extraConfig = ''
HostCertificate /etc/ssh/ssh_host_ed25519_key-cert.pub
HostKey /etc/ssh/ssh_host_ed25519_key
TrustedUserCAKeys /etc/ssh/ssh_user_key.pub
MaxAuthTries 20
'';
system.stateVersion = "21.05";
}

View file

@ -1,70 +0,0 @@
{ pkgs, config, lib, ... }:
{
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.requestEncryptionCredentials = true;
boot.loader.grub.copyKernels = true;
boot.loader.grub.efiSupport = false;
boot.kernelPackages = pkgs.linuxPackages_5_15;
boot.loader.grub.mirroredBoots = [
{ path = "/boot-1"; devices = [ "/dev/disk/by-id/ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M1TVUVJV" ]; }
{ path = "/boot-2"; devices = [ "/dev/disk/by-id/ata-WDC_WD20EFRX-68EUZN0_WD-WCC4M7UDRLSK" ]; }
];
boot.initrd.network = {
enable = true;
ssh = {
enable = true;
port = 2222;
hostKeys = [ /boot-1/initrd-ssh-key /boot-2/initrd-ssh-key ];
authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9Uzb7szWlux7HuxLZej9cBR5MhLz/vaAPPfSoozt2k"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDCKfPoMNrnyNWH6J1OvQ+n1rvSS9Sc2iZf6E1JQC+L4"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIESMWr29i3rhj32oLV3DKe57YI+jvNaKjZhhpq6dEjsn"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJOCKgHRHAJDSgKqYNfWboL04mnEOM0m0K3TGxBhBNDR"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOpGHx430EpJmbtJc8+lF1CpQ1gXeHT9OeZ08O8yzohF"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEaCGndojnmS5IoqHVMEPRfKuBZotMyqo7wNkAZJWigp"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINqqbb91oMRg0L5kcljMhuKi4l2TjE/JKJQwcFVahDJH"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILxfFq8wx5Bet5Q0gI28/lc9ryYYFQelpZdPPdzxGBbA"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGa+7n7kNzb86pTqaMn554KiPrkHRGeTJ0asY1NjSbpr"
];
};
postCommands = ''
zpool import zroot
echo "zfs load-key -a; killall zfs" >> /root/.profile
'';
};
boot.initrd.availableKernelModules = [ "tg3" "xhci_pci" "ahci" "ehci_pci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "zroot/root";
fsType = "zfs";
options = [ "nofail" ];
};
fileSystems."/boot-1" =
{
device = "/dev/disk/by-uuid/15AF-22DB";
fsType = "vfat";
options = [ "nofail" ];
};
fileSystems."/boot-2" =
{
device = "/dev/disk/by-uuid/15EC-BC00";
fsType = "vfat";
options = [ "nofail" ];
};
swapDevices = [ ];
}

View file

@ -1,31 +0,0 @@
{ pkgs, config, lib, ... }:
{
sops.secrets.ssh-newton-pub = {
owner = "julien";
path = "/home/julien/.ssh/id_ed25519.pub";
mode = "0644";
format = "binary";
sopsFile = ../../secrets/ssh-newton-pub;
};
sops.secrets.ssh-newton-priv = {
owner = "julien";
path = "/home/julien/.ssh/id_ed25519";
mode = "0600";
format = "binary";
sopsFile = ../../secrets/ssh-newton-priv;
};
luj.hmgr.julien = {
luj.programs.neovim.enable = true;
luj.programs.git.enable = true;
luj.programs.ssh-client.enable = true;
luj.emails = {
enable = true;
backend.enable = true;
};
};
}