2022-09-23 21:26:59 +03:00
|
|
|
{ inputs, config, lib, pkgs, ... }: {
|
2022-12-07 22:05:00 +03:00
|
|
|
imports = with inputs.self; [
|
2023-03-25 19:31:05 +03:00
|
|
|
./boot.nix
|
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
|
|
|
|
2023-03-25 19:31:05 +03:00
|
|
|
# nixosProfiles.stable-diffusion
|
2022-12-07 22:05:00 +03:00
|
|
|
nixosProfiles.a2ln-server
|
2023-04-15 03:19:30 +03:00
|
|
|
nixosProfiles.cassowary
|
2023-03-25 19:31:05 +03:00
|
|
|
# nixosProfiles.sunshine
|
2021-02-07 02:38:11 +03:00
|
|
|
];
|
2021-09-15 15:41:21 +03:00
|
|
|
|
2023-04-15 03:13:42 +03:00
|
|
|
virtualisation.libvirt.guests = {
|
|
|
|
win2k22 = {
|
|
|
|
autoStart = true;
|
|
|
|
user = config.mainuser;
|
|
|
|
group = "libvirtd";
|
|
|
|
xmlFile = ./win2k22.xml;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
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;
|
2023-04-15 03:18:30 +03:00
|
|
|
deviceSpecific.vpn.mullvad.enable = false;
|
|
|
|
deviceSpecific.vpn.ivpn.enable = true;
|
2023-03-26 19:24:28 +03:00
|
|
|
# hardware.firmware = [ pkgs.rtl8761b-firmware ];
|
2022-08-31 01:13:53 +03:00
|
|
|
|
2023-03-27 20:57:06 +03:00
|
|
|
programs.nix-ld.enable = true;
|
2023-01-26 00:23:55 +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 = {
|
2023-03-25 19:31:05 +03:00
|
|
|
# "/media/sys" = {
|
|
|
|
# fsType = "ntfs";
|
|
|
|
# device = "/dev/disk/by-partuuid/7d14b1b8-288a-4a5c-a306-6e6ba714d089";
|
|
|
|
# options = [
|
|
|
|
# "nofail"
|
|
|
|
# "uid=${toString config.users.users.${config.mainuser}.uid}"
|
|
|
|
# "gid=${toString config.users.groups.users.gid}"
|
|
|
|
# ];
|
|
|
|
# };
|
2022-12-14 23:49:46 +03:00
|
|
|
"/media/files" = {
|
|
|
|
fsType = "ntfs";
|
|
|
|
device = "/dev/mapper/files-veracrypt";
|
|
|
|
options = [
|
|
|
|
"nofail"
|
|
|
|
"uid=${toString config.users.users.${config.mainuser}.uid}"
|
|
|
|
"gid=${toString config.users.groups.users.gid}"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-02-22 23:57:37 +03:00
|
|
|
powerManagement.cpuFreqGovernor = "schedutil";
|
|
|
|
|
2023-02-11 01:19:24 +03:00
|
|
|
services.openssh.settings.PermitRootLogin = lib.mkForce "without-password";
|
2023-01-26 00:32:35 +03:00
|
|
|
|
2022-12-14 23:49:46 +03:00
|
|
|
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
|
2023-03-27 20:57:06 +03:00
|
|
|
# pkgs.prismlauncher
|
2022-12-14 23:49:46 +03:00
|
|
|
pkgs.piper
|
2023-02-14 07:04:20 +03:00
|
|
|
pkgs.osu-lazer-bin
|
2023-03-27 20:57:06 +03:00
|
|
|
pkgs.nix-alien
|
2023-02-14 07:04:20 +03:00
|
|
|
pkgs.nixpkgs-review
|
2023-02-22 23:57:37 +03:00
|
|
|
pkgs.anydesk
|
|
|
|
pkgs.winbox
|
2022-12-10 22:34:39 +03:00
|
|
|
];
|
2023-03-26 19:24:28 +03:00
|
|
|
home.stateVersion = "23.05";
|
2022-12-10 22:34:39 +03:00
|
|
|
};
|
2022-10-21 14:01:19 +03:00
|
|
|
|
2023-04-15 03:14:27 +03:00
|
|
|
persist.state.homeDirectories = [
|
|
|
|
".local/share/winbox"
|
|
|
|
];
|
|
|
|
|
2023-03-26 19:24:28 +03:00
|
|
|
system.stateVersion = "23.05";
|
2022-12-07 22:05:00 +03:00
|
|
|
|
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
|
|
|
}
|