183 lines
4.9 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
./kernel
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
2024-07-16 15:11:12 +03:00
# customProfiles.sunshine
2023-10-13 19:43:02 +03:00
customProfiles.wine-games
2024-06-18 18:28:21 +03:00
customProfiles.ollama
2024-07-16 14:50:57 +03:00
customProfiles.ccache
2021-09-15 15:41:21 +03:00
customProfiles.acme
customProfiles.media-stack
customProfiles.tinyproxy
./nginx.nix
../Home-Hypervisor/usb-hdd.nix
];
networking.extraHosts = ''
127.0.0.1 jackett.ataraxiadev.com
127.0.0.1 jellyfin.ataraxiadev.com
127.0.0.1 kavita.ataraxiadev.com
127.0.0.1 lidarr.ataraxiadev.com
127.0.0.1 medusa.ataraxiadev.com
127.0.0.1 qbit.ataraxiadev.com
127.0.0.1 radarr.ataraxiadev.com
127.0.0.1 recyclarr.ataraxiadev.com
127.0.0.1 sonarr.ataraxiadev.com
'';
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;
services.cryptmount.files-veracrypt = {
what = "/dev/disk/by-partuuid/15fa11a1-a6d8-4962-9c03-74b209d7c46a";
where = "/media/files";
fsType = "ntfs";
cryptType = "tcrypt";
passwordFile = config.sops.secrets.files-veracrypt.path;
mountOptions = [
"uid=${toString config.users.users.${config.mainuser}.uid}"
"gid=${toString config.users.groups.users.gid}"
];
2022-12-14 23:49:46 +03:00
};
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
};
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
2024-06-30 13:53:24 +03:00
networking.firewall.allowedTCPPorts = [ 8000 5900 52736 3456 ];
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-07-16 15:11:58 +03:00
services.modprobed-db.enable = true;
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
2024-06-27 20:18:12 +03:00
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
2024-03-31 19:46:48 +03:00
pkgs.mitmproxy
2024-04-23 21:37:27 +03:00
pkgs.exercism
2024-06-11 01:48:09 +03:00
pkgs.packwiz
2024-07-07 16:59:04 +03:00
pkgs.streamrip
2024-07-16 15:18:47 +03:00
pkgs.nix-diff
2024-07-16 15:11:58 +03:00
2024-07-16 15:18:47 +03:00
pkgs.libsForQt5.ark
pkgs.libsForQt5.dolphin
pkgs.nh
pkgs.yt-archivist
2024-07-16 15:11:58 +03:00
pkgs.modprobed-db
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"
'';
2024-06-17 19:48:55 +03:00
home.stateVersion = "24.05";
2022-12-10 22:34:39 +03:00
};
2022-10-21 14:01:19 +03:00
2024-07-01 12:01:57 +03:00
services.netbird.clients.priv = {
interface = "wt0";
port = 58467;
hardened = false;
ui.enable = true;
autoStart = false;
config = {
AdminURL.Host = "net.ataraxiadev.com:443";
AdminURL.Scheme = "https";
ManagementURL.Host = "net.ataraxiadev.com:443";
ManagementURL.Scheme = "https";
RosenpassEnabled = true;
RosenpassPermissive = true;
};
};
2024-06-30 13:49:13 +03:00
2024-06-17 19:47:18 +03:00
persist.state = {
2024-07-01 12:01:57 +03:00
directories = [ "/var/lib/netbird-priv" ];
2024-06-17 19:47:18 +03:00
homeDirectories = [
2024-06-18 18:28:21 +03:00
".local/share/winbox"
".local/share/PrismLauncher"
".local/share/distrobox"
".mitmproxy"
".config/exercism"
2024-07-16 15:11:58 +03:00
".config/modprobed-db"
2024-07-07 16:59:04 +03:00
".config/streamrip"
2024-06-18 18:28:21 +03:00
];
2024-06-17 19:47:18 +03:00
};
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
}