129 lines
3.5 KiB
Nix
Raw Normal View History

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
2023-10-13 19:43:02 +03:00
customRoles.workstation
2022-10-21 14:01:19 +03:00
2023-10-13 19:43:02 +03:00
customProfiles.a2ln-server
customProfiles.act
customProfiles.attic
customProfiles.bluetooth
customProfiles.cassowary
customProfiles.emulators
customProfiles.hoyo
customProfiles.minecraft
2023-11-16 03:47:35 +03:00
customProfiles.nicotine
2023-10-13 19:43:02 +03:00
customProfiles.sunshine
customProfiles.wine-games
2021-02-07 02:38:11 +03:00
];
2021-09-15 15:41:21 +03:00
security.pki.certificateFiles = [ ../../misc/mitmproxy-ca-cert.pem ];
2023-04-15 03:13:42 +03:00
virtualisation.libvirt.guests = {
2023-11-11 03:12:03 +03:00
win10 = {
autoStart = true;
user = config.mainuser;
group = "libvirtd";
xmlFile = ./vm/win10.xml;
};
2024-01-12 23:52:00 +03:00
win10-server = {
autoStart = false;
user = config.mainuser;
group = "libvirtd";
xmlFile = ./vm/win10-server.xml;
};
2023-04-15 03:13:42 +03:00
};
2021-02-07 02:38:11 +03:00
deviceSpecific.devInfo = {
2024-01-21 19:29:36 +03:00
cpu.vendor = "amd";
drive.type = "ssd";
gpu.vendor = "amd";
2022-10-08 04:32:18 +03:00
ram = 48;
fileSystem = "zfs";
2021-02-07 02:38:11 +03:00
};
deviceSpecific.isGaming = true;
deviceSpecific.enableVirtualisation = true;
2023-07-05 20:42:56 +03:00
# VPN
deviceSpecific.vpn.tailscale.enable = true;
2024-01-22 16:44:51 +03:00
sops.secrets.wg-ataraxia.sopsFile = inputs.self.secretsDir + /wg-configs.yaml;
2023-08-11 11:02:05 +03:00
networking.wg-quick.interfaces.wg0.autostart = false;
2024-01-22 16:44:51 +03:00
networking.wg-quick.interfaces.wg0.configFile = config.sops.secrets.wg-ataraxia.path;
2024-01-21 19:29:36 +03:00
# Mount
2024-01-22 16:44:51 +03:00
# TODO: fix sops
sops.secrets.files-veracrypt.sopsFile = inputs.self.secretsDir + /amd-workstation/misc.yaml;
2022-12-14 23:49:46 +03:00
environment.etc.crypttab = {
text = ''
files-veracrypt /dev/disk/by-partuuid/15fa11a1-a6d8-4962-9c03-74b209d7c46a /var/secrets/files-veracrypt tcrypt-veracrypt
'';
};
fileSystems = {
2023-05-24 21:24:33 +03:00
"/media/win-sys" = {
fsType = "ntfs";
device = "/dev/disk/by-partuuid/5b47cea7-465c-4051-a6ba-76d0eaf42929";
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";
2024-01-21 19:29:36 +03:00
hardware.firmware = [ pkgs.rtl8761b-firmware ];
2023-02-11 01:19:24 +03:00
services.openssh.settings.PermitRootLogin = lib.mkForce "without-password";
2022-12-14 23:49:46 +03:00
services.ratbagd.enable = true;
2024-01-21 19:29:36 +03:00
# Networking
2023-10-01 23:39:32 +03:00
networking.firewall.allowedTCPPorts = [ 8000 5900 52736 ];
2023-10-13 19:53:37 +03:00
networking.nameservers = [ "192.168.0.1" ];
networking.defaultGateway = "192.168.0.1";
2023-11-22 05:56:04 +03:00
networking.bridges.br0.interfaces = [ "enp9s0" ];
2023-10-13 19:53:37 +03:00
networking.interfaces.br0 = {
useDHCP = false;
ipv4.addresses = [{
address = "192.168.0.100";
prefixLength = 24;
}];
};
2023-09-16 00:52:52 +03:00
2024-01-21 19:29:36 +03:00
programs.nix-ld.enable = true;
2022-12-10 22:34:39 +03:00
home-manager.users.${config.mainuser} = {
2023-09-16 00:52:52 +03:00
home.packages = [
2022-12-14 23:49:46 +03:00
inputs.nixos-generators.packages.${pkgs.hostPlatform.system}.nixos-generate
2023-07-26 21:19:30 +03:00
pkgs.prismlauncher
2022-12-14 23:49:46 +03:00
pkgs.piper
2023-03-27 20:57:06 +03:00
pkgs.nix-alien
2023-07-26 21:19:30 +03:00
# pkgs.nix-init
2023-02-14 07:04:20 +03:00
pkgs.nixpkgs-review
2023-02-22 23:57:37 +03:00
pkgs.anydesk
pkgs.winbox
2023-08-05 07:41:59 +03:00
pkgs.devenv
2023-08-30 18:38:28 +03:00
pkgs.radeontop
2023-09-16 00:52:52 +03:00
pkgs.wayvnc
2023-10-01 23:39:32 +03:00
pkgs.distrobox
2023-10-13 19:52:54 +03:00
pkgs.nix-fast-build
2022-12-10 22:34:39 +03:00
];
2023-10-01 23:39:32 +03:00
xdg.configFile."distrobox/distrobox.conf".text = ''
container_always_pull="1"
container_manager="podman"
'';
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-10-01 23:39:32 +03:00
persist.state.homeDirectories = [
".local/share/winbox"
".local/share/PrismLauncher"
".local/share/distrobox"
];
2023-04-15 03:14:27 +03:00
2023-03-26 19:24:28 +03:00
system.stateVersion = "23.05";
2021-02-07 02:38:11 +03:00
}