2022-04-03 18:03:55 +02:00
|
|
|
{ config, lib, pkgs, inputs, specialArgs, ... }:
|
2022-03-22 16:36:19 +01:00
|
|
|
{
|
2023-12-11 13:27:40 +01:00
|
|
|
imports = [
|
2024-06-08 12:47:46 +02:00
|
|
|
./services/avahi.nix
|
2024-08-24 01:45:35 +02:00
|
|
|
./services/btrfs.nix
|
2023-12-11 13:27:40 +01:00
|
|
|
./services/docker.nix
|
|
|
|
./services/libvirtd.nix
|
|
|
|
./services/logiops.nix
|
|
|
|
./services/postgres.nix
|
|
|
|
./services/stable-diffusion.nix
|
|
|
|
./services/tailscale.nix
|
2024-06-02 16:18:56 +02:00
|
|
|
./services/keybase.nix
|
2024-06-26 20:31:15 +02:00
|
|
|
|
2024-10-05 12:08:58 +02:00
|
|
|
./nspawn-containers/arch.nix
|
|
|
|
];
|
|
|
|
|
2024-06-26 20:31:15 +02:00
|
|
|
system.stateVersion = "22.05";
|
2024-06-25 21:25:55 +02:00
|
|
|
|
2024-06-25 19:03:00 +02:00
|
|
|
boot.binfmt.emulatedSystems = [
|
|
|
|
"x86_64-windows"
|
|
|
|
"aarch64-linux"
|
|
|
|
"armv7l-linux"
|
2024-10-05 12:09:15 +02:00
|
|
|
"i686-linux"
|
2024-06-25 19:03:00 +02:00
|
|
|
];
|
|
|
|
|
2024-06-02 16:26:44 +02:00
|
|
|
nix.settings.system-features = [
|
|
|
|
"kvm"
|
|
|
|
"benchmark"
|
|
|
|
"big-parallel"
|
|
|
|
"nixos-test"
|
|
|
|
];
|
|
|
|
|
|
|
|
i18n.extraLocaleSettings = {
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
|
|
|
};
|
2023-12-11 13:27:40 +01:00
|
|
|
|
2022-06-22 20:16:57 +02:00
|
|
|
machineVars = {
|
|
|
|
headless = false;
|
|
|
|
gaming = true;
|
|
|
|
development = true;
|
|
|
|
creative = true;
|
|
|
|
|
2022-06-02 16:33:21 +02:00
|
|
|
dataDrives = let
|
2022-06-22 20:16:57 +02:00
|
|
|
main = "/data";
|
|
|
|
in {
|
|
|
|
drives = { inherit main; };
|
|
|
|
default = main;
|
|
|
|
};
|
|
|
|
|
2022-11-20 17:12:27 +01:00
|
|
|
screens = {
|
2023-02-25 18:04:55 +01:00
|
|
|
DVI-D-0 = {
|
2022-11-20 17:12:27 +01:00
|
|
|
primary = true;
|
|
|
|
};
|
2023-02-25 18:04:55 +01:00
|
|
|
DP-4 = {
|
|
|
|
frequency = 144;
|
2022-11-20 17:12:27 +01:00
|
|
|
position = "1920x0";
|
|
|
|
};
|
|
|
|
};
|
2022-06-22 20:16:57 +02:00
|
|
|
};
|
|
|
|
|
2022-03-22 16:36:19 +01:00
|
|
|
systemd.targets = {
|
|
|
|
sleep.enable = false;
|
|
|
|
suspend.enable = false;
|
|
|
|
hibernate.enable = false;
|
|
|
|
hybrid-sleep.enable = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# security.pam.services.login.unixAuth = true;
|
|
|
|
|
2023-02-25 18:04:55 +01:00
|
|
|
networking = {
|
|
|
|
hostName = "kasei";
|
|
|
|
networkmanager.enable = true;
|
|
|
|
interfaces.enp6s0.useDHCP = true;
|
2024-06-02 16:26:44 +02:00
|
|
|
firewall.enable = false;
|
2023-05-08 02:50:47 +02:00
|
|
|
hostId = "f0660cef";
|
2023-02-25 18:04:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
2023-07-28 17:59:34 +02:00
|
|
|
openssh = {
|
|
|
|
enable = true;
|
|
|
|
settings.X11Forwarding = true;
|
|
|
|
};
|
2024-08-01 00:47:46 +02:00
|
|
|
xserver.videoDrivers = [ "amdgpu" ];
|
2023-07-28 17:59:34 +02:00
|
|
|
tailscale.enable = true;
|
2024-06-02 16:26:44 +02:00
|
|
|
avahi = {
|
|
|
|
enable = true;
|
|
|
|
publish.enable = true;
|
|
|
|
publish.addresses = true;
|
|
|
|
publish.domain = true;
|
|
|
|
publish.hinfo = true;
|
|
|
|
publish.userServices = true;
|
|
|
|
publish.workstation = true;
|
|
|
|
extraServiceFiles.ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
|
|
|
|
};
|
2023-02-25 18:04:55 +01:00
|
|
|
};
|
|
|
|
|
2022-08-19 12:55:26 +02:00
|
|
|
boot = {
|
2023-02-25 18:01:06 +01:00
|
|
|
initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
2024-08-01 00:47:46 +02:00
|
|
|
initrd.kernelModules = [ "amdgpu" ];
|
2023-07-28 17:59:34 +02:00
|
|
|
|
|
|
|
# kernelPackages = pkgs.linuxKernel.packages.linux_zen.zfs;
|
|
|
|
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
2023-02-25 18:01:06 +01:00
|
|
|
kernelModules = [ "kvm-amd" ];
|
2023-07-28 17:59:34 +02:00
|
|
|
supportedFilesystems = [ "zfs" ];
|
|
|
|
|
2022-08-19 12:55:26 +02:00
|
|
|
loader = {
|
|
|
|
efi.canTouchEfiVariables = false;
|
|
|
|
grub = {
|
|
|
|
enable = true;
|
|
|
|
efiSupport = true;
|
|
|
|
fsIdentifier = "label";
|
|
|
|
device = "nodev";
|
|
|
|
efiInstallAsRemovable = true;
|
|
|
|
};
|
2022-03-22 16:36:19 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-02-25 18:01:06 +01:00
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-uuid/70a0ca95-4ca4-4298-a8c4-e492705cfb93";
|
|
|
|
fsType = "btrfs";
|
|
|
|
};
|
|
|
|
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-uuid/D883-A077";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
|
|
|
|
"/data" = {
|
|
|
|
device = "/dev/disk/by-label/data1";
|
|
|
|
fsType = "btrfs";
|
|
|
|
};
|
2022-03-22 16:36:19 +01:00
|
|
|
|
2023-02-25 18:01:06 +01:00
|
|
|
"/data/disks/data2" = {
|
|
|
|
device = "/dev/disk/by-uuid/7afc5f6b-947a-4c86-a5b5-dfefe42899c0";
|
|
|
|
fsType = "ext4";
|
2022-03-22 16:36:19 +01:00
|
|
|
};
|
2022-06-02 16:33:21 +02:00
|
|
|
};
|
2022-03-22 16:36:19 +01:00
|
|
|
|
2023-02-25 18:01:06 +01:00
|
|
|
swapDevices = [ ];
|
2022-03-22 16:36:19 +01:00
|
|
|
|
2023-02-25 18:01:06 +01:00
|
|
|
hardware = {
|
|
|
|
bluetooth.enable = true;
|
|
|
|
cpu.amd.updateMicrocode = true;
|
|
|
|
enableRedistributableFirmware = true;
|
|
|
|
keyboard.zsa.enable = true;
|
2024-08-02 17:20:01 +02:00
|
|
|
sane.enable = true;
|
2024-06-02 16:26:44 +02:00
|
|
|
opengl = {
|
|
|
|
enable = true;
|
|
|
|
driSupport = true;
|
|
|
|
driSupport32Bit = true;
|
|
|
|
};
|
2022-03-22 16:36:19 +01:00
|
|
|
};
|
|
|
|
}
|