202 lines
5.2 KiB
Nix
Raw Normal View History

{ inputs, config, lib, pkgs, secretsDir, ... }: {
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
2024-09-11 18:01:30 +03:00
# ./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
2024-09-19 23:56:49 +03:00
customProfiles.aria2
2024-09-11 18:01:30 +03:00
# customProfiles.attic
2023-10-13 19:43:02 +03:00
customProfiles.bluetooth
customProfiles.cassowary
customProfiles.emulators
2024-10-24 01:42:29 +03:00
customProfiles.flatpak
2023-10-13 19:43:02 +03:00
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
2024-11-12 00:59:34 +03:00
inputs.chaotic.nixosModules.default
];
# chaotic.nyx.overlay.enable = true;
startupApplications = [ "com.valvesoftware.Steam" ];
# nixpkgs.config.rocmSupport = true;
security.pki.certificateFiles = [ ../../misc/mitmproxy-ca-cert.pem ];
2023-04-15 03:13:42 +03:00
virtualisation.libvirt.guests = {
2024-12-28 11:35:48 +03:00
win10code = {
2025-02-12 21:55:40 +03:00
autoStart = false;
2024-12-28 11:35:48 +03:00
user = config.mainuser;
group = "libvirtd";
xmlFile = ./vm/win10code.xml;
};
win10ed = {
2024-01-12 23:52:00 +03:00
autoStart = false;
user = config.mainuser;
group = "libvirtd";
2024-12-28 11:35:48 +03:00
xmlFile = ./vm/win10ed.xml;
2024-01-12 23:52:00 +03:00
};
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;
deviceSpecific.vpn.sing-box.enable = true;
deviceSpecific.vpn.sing-box.config = "ataraxia-singbox";
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 = 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}"
];
};
2024-12-28 11:37:41 +03:00
"/media/local-nfs" = {
device = "10.10.10.11:/";
fsType = "nfs4";
options = [ "nfsvers=4.2" "x-systemd.automount" "noauto" ];
};
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
networking.firewall.allowedTCPPorts = [ 8000 5900 52736 3456 1080 ];
2024-08-04 13:57:46 +03:00
networking.nameservers = [ "10.10.10.1" ];
networking.defaultGateway = "10.10.10.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 = [{
2024-08-04 13:57:46 +03:00
address = "10.10.10.100";
2023-10-13 19:53:37 +03:00
prefixLength = 24;
}];
};
2023-09-16 00:52:52 +03:00
services.postgresql.settings = {
full_page_writes = "off";
wal_init_zero = "off";
wal_recycle = "off";
};
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;
2024-10-24 01:59:43 +03:00
environment.systemPackages = [
pkgs.kdiskmark
];
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
2024-09-14 18:48:27 +03:00
pkgs.devenv
pkgs.nh
2023-03-27 20:57:06 +03:00
pkgs.nix-alien
2024-09-14 18:48:27 +03:00
pkgs.nix-diff
pkgs.nix-eval-jobs
pkgs.nix-fast-build
2023-07-26 21:19:30 +03:00
# pkgs.nix-init
2024-09-14 18:48:27 +03:00
pkgs.nix-update
pkgs.nixfmt-rfc-style
pkgs.nixos-anywhere
2023-02-14 07:04:20 +03:00
pkgs.nixpkgs-review
2024-09-14 18:48:27 +03:00
2023-02-22 23:57:37 +03:00
pkgs.anydesk
2024-09-14 18:48:27 +03:00
pkgs.arduino-ide
pkgs.dig.dnsutils
2023-10-01 23:39:32 +03:00
pkgs.distrobox
2024-04-23 21:37:27 +03:00
pkgs.exercism
2024-12-28 11:40:55 +03:00
pkgs.freerdp
2024-09-14 18:48:27 +03:00
pkgs.kdePackages.merkuro
2024-07-16 15:18:47 +03:00
pkgs.libsForQt5.ark
pkgs.libsForQt5.dolphin
2024-11-12 00:58:04 +03:00
pkgs.maa-cli
2024-09-14 18:48:27 +03:00
pkgs.mitmproxy
2024-12-28 11:40:55 +03:00
pkgs.mkvtoolnix
2024-07-16 15:11:58 +03:00
pkgs.modprobed-db
2024-09-14 18:48:27 +03:00
pkgs.packwiz
pkgs.piper
pkgs.prismlauncher
pkgs.radeontop
pkgs.streamrip
pkgs.wayvnc
pkgs.winbox
pkgs.yt-archivist
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-10-24 01:39:51 +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-08-04 13:46:46 +03:00
".arduino15"
".arduinoIDE"
2024-06-18 18:28:21 +03:00
".config/exercism"
2024-11-12 00:58:04 +03:00
".config/maa"
2024-07-16 15:11:58 +03:00
".config/modprobed-db"
2024-10-24 01:40:30 +03:00
".config/sops/age"
2024-07-07 16:59:04 +03:00
".config/streamrip"
2024-11-12 00:58:04 +03:00
".local/share/distrobox"
".local/share/maa"
".local/share/PrismLauncher"
".local/share/winbox"
".mitmproxy"
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
}