config/hosts/fwminex/configuration.nix

153 lines
3.4 KiB
Nix
Raw Normal View History

2023-09-13 12:17:43 +03:00
{
config,
pkgs,
myData,
...
2023-09-17 07:06:19 +03:00
}: let
randr = import ./randr.nix;
in {
2023-09-13 12:17:43 +03:00
zfs-root = {
boot = {
enable = true;
devNodes = "/dev/disk/by-id/";
bootDevices = ["nvme-Samsung_SSD_970_EVO_Plus_2TB_S6P1NS0TA01331A"];
immutable = false;
2023-09-13 14:14:25 +03:00
forceNoDev2305 = true;
availableKernelModules = ["usb_storage" "sd_mod" "xhci_pci" "thunderbolt" "nvme" "usbhid"];
2023-09-13 12:17:43 +03:00
removableEfi = true;
2023-09-13 13:54:22 +03:00
partitionScheme = {
efiBoot = "-part1";
bootPool = "-part2";
rootPool = "-part4";
};
2023-09-13 12:17:43 +03:00
};
};
2023-09-14 12:40:16 +03:00
powerManagement.cpuFreqGovernor = "powersave";
hardware.cpu.intel.updateMicrocode = true;
nixpkgs.hostPlatform = "x86_64-linux";
2023-09-13 12:17:43 +03:00
boot.binfmt.emulatedSystems = ["aarch64-linux"];
2023-09-14 06:41:37 +03:00
#swapDevices = [];
2023-09-13 15:18:25 +03:00
2023-09-13 12:17:43 +03:00
boot.loader.grub.extraEntries = ''
menuentry "Debian via bpool label" {
search --set=bpool --label bpool
configfile "$(bpool)/@/BOOT/debian@/grub/grub.cfg"
}
menuentry "Debian 3915eee7610a7d61" {
search --set=root 3915eee7610a7d61
configfile "/BOOT/debian@/grub/grub.cfg"
}
menuentry "Debian 4113456512205749601" {
search --set=root 4113456512205749601
configfile "/BOOT/debian@/grub/grub.cfg"
}
'';
2023-09-14 15:26:16 +03:00
systemd.services.zfs-mount.enable = false;
2023-09-13 12:17:43 +03:00
mj = {
stateVersion = "23.05";
timeZone = "Europe/Vilnius";
base = {
zfs.enable = true;
users = {
devEnvironment = true;
passwd = {
2023-09-15 13:23:52 +03:00
root.passwordFile = config.age.secrets.root-passwd-hash.path;
motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path;
2023-09-13 12:17:43 +03:00
};
};
snapshot = {
enable = true;
mountpoints = ["/home" "/var/lib" "/var/log"];
};
unitstatus = {
enable = true;
email = "motiejus+alerts@jakstys.lt";
};
};
services = {
node_exporter.enable = true;
sshguard.enable = false;
tailscale = {
enable = true;
silenceLogs = true;
};
2023-09-13 12:17:43 +03:00
deployerbot = {
follower = {
enable = true;
uidgid = myData.uidgid.updaterbot-deployee;
publicKey = myData.hosts."vno1-oh2.servers.jakst".publicKey;
};
};
2023-09-15 13:23:52 +03:00
postfix = {
enable = true;
saslPasswdPath = config.age.secrets.sasl-passwd.path;
};
2023-09-13 12:17:43 +03:00
syncthing = {
2023-09-15 13:29:55 +03:00
enable = false;
2023-09-13 12:17:43 +03:00
dataDir = "/home/motiejus/";
user = "motiejus";
group = "users";
};
};
};
2023-09-17 07:06:19 +03:00
home-manager.users.motiejus = {pkgs, ...}: {
programs.autorandr.profiles = {
2023-09-17 22:12:46 +03:00
laptop = {
fingerprint = {inherit (randr) eDP-1;};
config = {
eDP-1 = {
enable = true;
primary = true;
mode = "2256x1504";
crtc = 0;
2023-09-17 22:02:30 +03:00
};
};
2023-09-17 22:12:46 +03:00
};
2023-09-17 22:02:30 +03:00
2023-09-17 07:06:19 +03:00
dualhome = {
2023-09-17 22:02:30 +03:00
fingerprint = {inherit (randr) eDP-1 DP-3 DP-4;};
2023-09-17 07:06:19 +03:00
config = {
eDP-1.enable = false;
DP-4 = {
enable = true;
mode = "2560x1440";
2023-09-17 07:39:00 +03:00
position = "2560x0";
2023-09-17 07:06:19 +03:00
primary = true;
2023-09-17 22:02:30 +03:00
crtc = 0;
2023-09-17 07:06:19 +03:00
};
DP-3 = {
enable = true;
mode = "2560x1440";
position = "0x0";
2023-09-17 22:02:30 +03:00
crtc = 1;
2023-09-17 07:06:19 +03:00
};
};
};
};
};
2023-09-15 13:01:20 +03:00
environment.systemPackages = with pkgs; [
2023-09-16 08:53:23 +03:00
iw
2023-09-15 13:01:20 +03:00
texlive.combined.scheme-medium
];
2023-09-13 12:17:43 +03:00
networking = {
2023-09-13 14:46:58 +03:00
hostId = "3a54afcd";
2023-09-13 12:17:43 +03:00
hostName = "fwminex";
domain = "motiejus.jakst";
};
}