2022-09-23 21:26:59 +03:00
|
|
|
{ inputs, config, lib, pkgs, ... }: {
|
2022-12-07 22:05:00 +03:00
|
|
|
imports = with inputs.self; [
|
2021-02-07 02:38:11 +03:00
|
|
|
./hardware-configuration.nix
|
2022-12-07 22:05:00 +03:00
|
|
|
nixosRoles.workstation
|
2022-10-21 14:01:19 +03:00
|
|
|
|
2022-12-07 22:05:00 +03:00
|
|
|
nixosProfiles.stable-diffusion
|
|
|
|
nixosProfiles.a2ln-server
|
2022-12-07 22:16:53 +03:00
|
|
|
nixosProfiles.sunshine
|
2022-12-07 22:21:07 +03:00
|
|
|
|
2023-01-26 00:09:21 +03:00
|
|
|
# customModules.passthrough
|
2021-02-07 02:38:11 +03:00
|
|
|
];
|
2021-09-15 15:41:21 +03:00
|
|
|
|
2021-02-07 02:38:11 +03:00
|
|
|
deviceSpecific.devInfo = {
|
|
|
|
cpu = {
|
|
|
|
vendor = "amd";
|
|
|
|
clock = 3700;
|
2022-12-07 22:05:00 +03:00
|
|
|
cores = 12;
|
2021-02-07 02:38:11 +03:00
|
|
|
};
|
|
|
|
drive = {
|
|
|
|
type = "ssd";
|
|
|
|
speed = 6000;
|
|
|
|
size = 1000;
|
|
|
|
};
|
|
|
|
gpu = {
|
|
|
|
vendor = "amd";
|
|
|
|
};
|
|
|
|
bigScreen = true;
|
2022-10-08 04:32:18 +03:00
|
|
|
ram = 48;
|
|
|
|
fileSystem = "zfs";
|
2021-02-07 02:38:11 +03:00
|
|
|
};
|
|
|
|
deviceSpecific.isHost = true;
|
|
|
|
deviceSpecific.isShared = false;
|
|
|
|
deviceSpecific.isGaming = true;
|
|
|
|
deviceSpecific.enableVirtualisation = true;
|
2021-06-16 23:42:44 +03:00
|
|
|
deviceSpecific.wireguard.enable = true;
|
2021-09-15 15:41:21 +03:00
|
|
|
|
2022-10-21 14:00:16 +03:00
|
|
|
boot.zfs.forceImportAll = lib.mkForce false;
|
|
|
|
|
2021-09-15 15:41:21 +03:00
|
|
|
hardware.video.hidpi.enable = lib.mkForce false;
|
2022-08-23 16:13:51 +03:00
|
|
|
hardware.firmware = [ pkgs.rtl8761b-firmware ];
|
2022-08-31 01:13:53 +03:00
|
|
|
|
2022-12-14 23:49:46 +03:00
|
|
|
secrets.files-veracrypt = {};
|
|
|
|
environment.etc.crypttab = {
|
|
|
|
text = ''
|
|
|
|
files-veracrypt /dev/disk/by-partuuid/15fa11a1-a6d8-4962-9c03-74b209d7c46a /var/secrets/files-veracrypt tcrypt-veracrypt
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/media/data" = {
|
|
|
|
fsType = "ntfs";
|
|
|
|
device = "/dev/disk/by-partuuid/a61ac8ea-53b9-462f-8a93-a5c07b131209";
|
|
|
|
options = [
|
|
|
|
"nofail"
|
|
|
|
"uid=${toString config.users.users.${config.mainuser}.uid}"
|
|
|
|
"gid=${toString config.users.groups.users.gid}"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
"/media/files" = {
|
|
|
|
# Samba host
|
|
|
|
fsType = "ntfs";
|
|
|
|
device = "/dev/mapper/files-veracrypt";
|
|
|
|
options = [
|
|
|
|
"nofail"
|
|
|
|
"uid=${toString config.users.users.${config.mainuser}.uid}"
|
|
|
|
"gid=${toString config.users.groups.users.gid}"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.ratbagd.enable = true;
|
|
|
|
|
2022-12-10 22:34:39 +03:00
|
|
|
home-manager.users.${config.mainuser} = {
|
|
|
|
home.packages = lib.mkIf config.deviceSpecific.enableVirtualisation [
|
2022-12-14 23:49:46 +03:00
|
|
|
inputs.nixos-generators.packages.${pkgs.hostPlatform.system}.nixos-generate
|
2022-12-10 22:34:39 +03:00
|
|
|
# pkgs.looking-glass-client
|
2022-12-14 23:49:46 +03:00
|
|
|
pkgs.piper
|
2022-12-10 22:34:39 +03:00
|
|
|
];
|
|
|
|
home.stateVersion = "21.11";
|
|
|
|
};
|
2022-10-21 14:01:19 +03:00
|
|
|
|
2022-12-07 22:05:00 +03:00
|
|
|
system.stateVersion = "21.11";
|
|
|
|
|
2022-10-21 14:01:19 +03:00
|
|
|
# VFIO Passthough
|
|
|
|
# virtualisation = {
|
|
|
|
# sharedMemoryFiles = {
|
|
|
|
# # scream = {
|
2022-12-10 22:34:39 +03:00
|
|
|
# # user = config.mainuser;
|
2022-10-21 14:01:19 +03:00
|
|
|
# # group = "qemu-libvirtd";
|
|
|
|
# # mode = "666";
|
|
|
|
# # };
|
|
|
|
# looking-glass = {
|
2022-12-10 22:34:39 +03:00
|
|
|
# user = config.mainuser;
|
2022-10-21 14:01:19 +03:00
|
|
|
# group = "libvirtd";
|
|
|
|
# mode = "666";
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
# libvirtd = {
|
|
|
|
# enable = true;
|
|
|
|
# qemu = {
|
|
|
|
# ovmf.enable = true;
|
|
|
|
# runAsRoot = lib.mkForce true;
|
|
|
|
# };
|
|
|
|
#
|
|
|
|
# onBoot = "ignore";
|
|
|
|
# onShutdown = "shutdown";
|
|
|
|
#
|
|
|
|
# clearEmulationCapabilities = false;
|
|
|
|
#
|
|
|
|
# deviceACL = [
|
|
|
|
# # "/dev/input/by-path/pci-0000:0b:00.3-usb-0:2.2.4:1.0-event-mouse" # Trackball
|
|
|
|
# # "/dev/input/by-path/pci-0000:0b:00.3-usb-0:2.2.3:1.0-event-kbd" # Tastatur
|
|
|
|
# # "/dev/input/by-path/pci-0000:0b:00.3-usb-0:2.2.3:1.1-event-mouse" # Tastatur
|
|
|
|
# # "/dev/input/by-path/pci-0000:0b:00.3-usb-0:2.2.3:1.1-mouse" # Tastatur
|
|
|
|
# "/dev/vfio/vfio"
|
|
|
|
# "/dev/vfio/17"
|
|
|
|
# "/dev/kvm"
|
|
|
|
# # "/dev/shm/scream"
|
|
|
|
# "/dev/shm/looking-glass"
|
|
|
|
# ];
|
|
|
|
# };
|
|
|
|
# vfio = {
|
|
|
|
# enable = true;
|
|
|
|
# IOMMUType = "amd";
|
|
|
|
# # group 17: 0b:00.0 and 0b:00.1
|
|
|
|
# devices = [ "10de:1244" "10de:0bee" ];
|
|
|
|
# blacklistNvidia = true;
|
|
|
|
# disableEFIfb = false;
|
|
|
|
# ignoreMSRs = true;
|
|
|
|
# applyACSpatch = false;
|
|
|
|
# };
|
|
|
|
# hugepages = {
|
|
|
|
# enable = true;
|
|
|
|
# defaultPageSize = "1G";
|
|
|
|
# pageSize = "1G";
|
|
|
|
# numPages = 6;
|
|
|
|
# };
|
|
|
|
# };
|
2021-02-07 02:38:11 +03:00
|
|
|
}
|