2024-09-01 05:46:17 +03:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
myData,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-08-05 15:43:08 +03:00
|
|
|
let
|
|
|
|
nvme = "/dev/disk/by-id/nvme-Samsung_SSD_970_EVO_Plus_2TB_S6P1NX0TA00913P";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
../../modules
|
|
|
|
../../modules/profiles/desktop
|
2024-08-05 16:25:21 +03:00
|
|
|
../../modules/profiles/autorandr
|
2024-08-05 15:43:08 +03:00
|
|
|
../../modules/profiles/btrfs
|
|
|
|
];
|
|
|
|
|
2024-08-27 08:50:57 +03:00
|
|
|
age.secrets = {
|
2024-08-27 08:57:17 +03:00
|
|
|
motiejus-passwd-hash.file = ../../secrets/motiejus_passwd_hash.age;
|
|
|
|
root-passwd-hash.file = ../../secrets/root_passwd_hash.age;
|
|
|
|
sasl-passwd.file = ../../secrets/postfix_sasl_passwd.age;
|
|
|
|
syncthing-key.file = ../../secrets/vno1-gdrx/syncthing/key.pem.age;
|
|
|
|
syncthing-cert.file = ../../secrets/vno1-gdrx/syncthing/cert.pem.age;
|
2024-08-27 08:50:57 +03:00
|
|
|
|
|
|
|
ssh8022-client = {
|
|
|
|
file = ../../secrets/ssh8022.age;
|
|
|
|
mode = "444";
|
|
|
|
};
|
2024-08-27 08:58:21 +03:00
|
|
|
|
|
|
|
borgbackup-fwminex = {
|
|
|
|
file = ../../secrets/fwminex/borgbackup-password.age;
|
|
|
|
owner = "motiejus";
|
|
|
|
};
|
2024-08-25 11:37:56 +03:00
|
|
|
};
|
|
|
|
|
2024-08-05 15:43:08 +03:00
|
|
|
boot = {
|
|
|
|
kernelModules = [ "kvm-intel" ];
|
|
|
|
loader.systemd-boot.enable = true;
|
|
|
|
initrd = {
|
2024-08-28 08:09:27 +03:00
|
|
|
systemd.enable = true;
|
2024-08-05 15:43:08 +03:00
|
|
|
availableKernelModules = [
|
|
|
|
"xhci_pci"
|
|
|
|
"thunderbolt"
|
|
|
|
"nvme"
|
|
|
|
"usbhid"
|
|
|
|
"tpm_tis"
|
|
|
|
];
|
|
|
|
luks.devices = {
|
|
|
|
luksroot = {
|
|
|
|
device = "${nvme}-part3";
|
|
|
|
allowDiscards = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [
|
|
|
|
{
|
|
|
|
device = "${nvme}-part2";
|
|
|
|
randomEncryption.enable = true;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/mapper/luksroot";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "compress=zstd" ];
|
|
|
|
};
|
|
|
|
"/boot" = {
|
|
|
|
device = "${nvme}-part1";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware.cpu.intel.updateMicrocode = true;
|
|
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
|
|
|
|
|
|
mj = {
|
|
|
|
stateVersion = "24.05";
|
|
|
|
timeZone = "Europe/Vilnius";
|
|
|
|
username = "motiejus";
|
|
|
|
|
|
|
|
base.users = {
|
|
|
|
enable = true;
|
|
|
|
devTools = true;
|
2024-08-05 16:09:13 +03:00
|
|
|
root.hashedPasswordFile = config.age.secrets.root-passwd-hash.path;
|
|
|
|
user.hashedPasswordFile = config.age.secrets.motiejus-passwd-hash.path;
|
2024-08-05 15:43:08 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
2024-09-16 14:49:07 +03:00
|
|
|
ping_exporter.enable = true;
|
|
|
|
|
|
|
|
node_exporter = {
|
|
|
|
enable = true;
|
|
|
|
extraSubnets = [ myData.subnets.vno1.cidr ];
|
|
|
|
};
|
|
|
|
|
2024-08-25 11:37:56 +03:00
|
|
|
ssh8022.client = {
|
|
|
|
enable = true;
|
|
|
|
keyfile = config.age.secrets.ssh8022-client.path;
|
|
|
|
};
|
|
|
|
|
2024-08-05 15:43:08 +03:00
|
|
|
tailscale = {
|
|
|
|
enable = true;
|
|
|
|
verboseLogs = true;
|
|
|
|
};
|
|
|
|
|
2024-08-05 18:48:52 +03:00
|
|
|
syncthing = {
|
|
|
|
enable = true;
|
|
|
|
dataDir = "/home/motiejus/";
|
|
|
|
user = "motiejus";
|
|
|
|
group = "users";
|
|
|
|
};
|
|
|
|
|
2024-08-05 19:07:06 +03:00
|
|
|
btrfssnapshot = {
|
|
|
|
enable = true;
|
|
|
|
subvolumes = [
|
|
|
|
{
|
|
|
|
subvolume = "/home";
|
|
|
|
label = "5minutely";
|
|
|
|
keep = 12;
|
|
|
|
refreshInterval = "*:0/5";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
subvolume = "/home";
|
|
|
|
label = "hourly";
|
|
|
|
keep = 24;
|
|
|
|
refreshInterval = "*:00:00";
|
|
|
|
}
|
2024-08-16 14:11:02 +03:00
|
|
|
{
|
|
|
|
subvolume = "/home";
|
|
|
|
label = "daily";
|
|
|
|
keep = 7;
|
|
|
|
refreshInterval = "daily UTC";
|
|
|
|
}
|
2024-08-05 19:07:06 +03:00
|
|
|
];
|
|
|
|
};
|
2024-08-05 15:43:08 +03:00
|
|
|
|
2024-08-05 16:09:13 +03:00
|
|
|
remote-builder.client =
|
|
|
|
let
|
|
|
|
host = myData.hosts."fra1-b.servers.jakst";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
enable = true;
|
|
|
|
inherit (host) system supportedFeatures;
|
|
|
|
hostName = host.jakstIP;
|
|
|
|
sshKey = "/etc/ssh/ssh_host_ed25519_key";
|
|
|
|
maxJobs = 2;
|
|
|
|
};
|
2024-08-05 15:43:08 +03:00
|
|
|
|
|
|
|
deployerbot = {
|
|
|
|
follower = {
|
|
|
|
publicKeys = [ myData.hosts."fwminex.servers.jakst".publicKey ];
|
|
|
|
|
|
|
|
enable = true;
|
|
|
|
uidgid = myData.uidgid.updaterbot-deployee;
|
|
|
|
sshAllowSubnets = with myData.subnets; [ tailscale.sshPattern ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-08-05 16:09:13 +03:00
|
|
|
postfix = {
|
|
|
|
enable = true;
|
|
|
|
saslPasswdPath = config.age.secrets.sasl-passwd.path;
|
|
|
|
};
|
2024-08-05 15:43:08 +03:00
|
|
|
|
|
|
|
#syncthing = {
|
|
|
|
# enable = true;
|
|
|
|
# dataDir = "/home/motiejus/";
|
|
|
|
# user = "motiejus";
|
|
|
|
# group = "users";
|
|
|
|
#};
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-09-04 22:43:23 +03:00
|
|
|
environment.systemPackages = with pkgs; [ thunderbird ];
|
2024-09-01 05:46:17 +03:00
|
|
|
|
2024-08-05 15:43:08 +03:00
|
|
|
networking = {
|
|
|
|
hostName = "vno1-gdrx";
|
|
|
|
domain = "motiejus.jakst";
|
|
|
|
firewall.rejectPackets = true;
|
|
|
|
};
|
|
|
|
}
|