nixos-config/hosts/yaseen/configuration.nix

209 lines
4.2 KiB
Nix
Raw Normal View History

2024-04-11 13:16:26 +02:00
{
pkgs,
lib,
2024-04-23 17:29:48 +02:00
inputs,
config,
2024-04-11 13:16:26 +02:00
...
2024-04-22 05:51:31 +02:00
}: let
sshKeys = import ../../crypto/ssh-keys.nix;
in {
2024-04-11 13:16:26 +02:00
imports = [
2024-06-07 18:06:59 +02:00
# Defaults
2024-04-11 13:16:26 +02:00
./hardware-configuration.nix
2024-04-22 20:48:35 +02:00
../../common/base.nix
2024-04-17 20:39:12 +02:00
../../common/full-install.nix
2024-04-11 13:16:26 +02:00
2024-06-07 18:06:59 +02:00
# Localization
2024-04-11 13:16:26 +02:00
../../common/locales/en.nix
2024-04-18 21:10:13 +02:00
../../common/locales/fr-keymap.nix
2024-04-22 06:39:13 +02:00
2024-06-07 18:06:59 +02:00
# Hardware
2024-04-22 05:51:31 +02:00
../../common/hardware/intel-cpu.nix
2024-04-22 21:24:54 +02:00
../../common/hardware/tpm2.nix
../../common/hardware/wireless.nix
2024-04-22 05:51:31 +02:00
../../common/hardware/nvidia-gpu.nix
../../common/hardware/nvidia-gpu-offload.nix
2024-04-17 22:28:27 +02:00
../../common/hardware/ssd.nix
2024-04-22 05:51:31 +02:00
../../common/hardware/btrfs.nix
2024-04-11 13:16:26 +02:00
2024-06-07 18:06:59 +02:00
# Software components
2024-04-22 21:24:54 +02:00
../../common/components/de/sddm.nix
../../common/components/de/plasma6.nix
2024-05-24 12:57:53 +02:00
# ../../common/components/de/hyprland.nix
2024-04-11 13:16:26 +02:00
2024-06-07 18:06:59 +02:00
# Programs
2024-04-22 20:48:35 +02:00
../../common/programs/steam.nix
2024-05-24 12:57:53 +02:00
2024-06-07 18:06:59 +02:00
# Services
2024-08-10 19:23:59 +02:00
# ../../common/services/auditd.nix
2024-05-17 16:07:34 +02:00
../../common/services/nix-gc.nix
2024-06-26 10:40:08 +02:00
../../common/services/opensnitch.nix
2024-08-10 19:23:59 +02:00
# ../../common/services/adguardhome.nix
2024-04-22 20:48:35 +02:00
../../common/services/syncthing.nix
../../common/services/usbguard.nix
2024-05-24 12:51:50 +02:00
../../common/services/autoupgrade.nix
2024-04-18 21:10:13 +02:00
2024-06-07 18:06:59 +02:00
# Home-manager
2024-04-23 17:29:48 +02:00
../../home/tasia/home.nix
2024-06-07 18:06:59 +02:00
2024-08-10 19:23:59 +02:00
inputs.agenix.nixosModules.default
../../common/components/wifi-secrets.nix
2024-06-07 18:06:59 +02:00
# Personal modules
2024-06-07 18:14:47 +02:00
# ../../modules/nixos/tildefriends.nix
2024-04-11 13:16:26 +02:00
];
# RGB Keyboard backight
boot.extraModulePackages = with config.boot.kernelPackages; [hid-ite8291r3];
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="leds", DEVPATH=="*:kbd_backlight", TEST=="color", ATTR{color}="fc4f05"
'';
2024-06-07 18:06:59 +02:00
# Nvidia GPU
hardware.nvidia.prime = {
intelBusId = "PCI:1:0:0";
nvidiaBusId = "PCI:0:2:0";
};
2024-04-11 13:16:26 +02:00
networking = {
2024-04-29 14:31:33 +02:00
hostName = "yaseen";
2024-04-11 13:16:26 +02:00
2024-04-18 21:10:13 +02:00
firewall = {
allowedTCPPorts = [
2024-06-01 00:29:03 +02:00
# 8080 # ?
2024-06-07 18:06:59 +02:00
# 8008 # ssb
# 12345 # tildefriends
# 13378 # audiobookshelf
2024-04-18 21:10:13 +02:00
];
allowedUDPPorts = [
2024-06-07 18:06:59 +02:00
# 8080 # ?
2024-04-18 21:10:13 +02:00
];
};
2024-04-11 13:16:26 +02:00
};
2024-04-23 17:29:48 +02:00
users.users.tasia.openssh.authorizedKeys.keys = [
2024-04-29 14:31:33 +02:00
sshKeys.tasia.yaseen
2024-04-23 17:29:48 +02:00
];
2024-04-11 13:16:26 +02:00
2024-04-18 21:10:13 +02:00
virtualisation.docker.enable = true;
2024-05-23 13:45:32 +02:00
services.flatpak.enable = true;
2024-04-11 13:16:26 +02:00
2024-04-11 17:08:50 +02:00
services.syncthing = {
2024-04-22 06:39:13 +02:00
user = "tasia";
dataDir = lib.mkForce "/home/tasia/Sync/data";
configDir = lib.mkForce "/home/tasia/Sync/configuration";
2024-04-11 17:08:50 +02:00
};
2024-04-11 13:16:26 +02:00
2024-04-18 21:10:13 +02:00
# Needed to build enry
boot.binfmt.emulatedSystems = ["aarch64-linux"];
2024-04-11 13:16:26 +02:00
environment.systemPackages = with pkgs; [
inputs.tildefriends.packages.${system}.default
2024-04-23 18:26:19 +02:00
osu-lazer-bin
prismlauncher
2024-06-07 18:14:47 +02:00
2024-06-24 10:16:41 +02:00
sherlock
whois
android-tools
2024-06-28 10:53:34 +02:00
ripgrep
lsd
viu
logseq
2024-07-31 16:27:07 +02:00
nix-tree
2024-06-28 10:53:34 +02:00
android-studio
2024-08-06 18:44:43 +02:00
lutris
inputs.agenix.packages.x86_64-linux.default
2024-06-28 10:53:34 +02:00
];
fonts.packages = with pkgs; [
(nerdfonts.override {fonts = ["CascadiaCode"];})
2024-04-11 13:16:26 +02:00
];
2024-04-27 13:56:15 +02:00
2024-06-24 10:16:41 +02:00
programs.adb.enable = true;
services.grafana = {
enable = false;
settings.server = {
domain = "grafana.enry";
http_port = 2342;
http_addr = "0.0.0.0";
};
};
services.prometheus = {
enable = false;
port = 9000;
retentionTime = "60d";
exporters = {
node = {
enable = false;
enabledCollectors = ["systemd"];
port = 9002;
};
};
scrapeConfigs = [
{
job_name = "enry";
static_configs = [
{
targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"];
}
];
}
{
job_name = "monitor";
static_configs = [
{
targets = ["127.0.0.1:8080"];
}
];
}
];
};
2024-08-06 18:44:43 +02:00
services.printing.drivers = [pkgs.cnijfilter2];
2024-07-31 16:26:45 +02:00
2024-06-26 10:43:53 +02:00
services.ollama = {
enable = true;
# acceleration = "cuda";
};
2024-06-24 10:16:41 +02:00
2024-06-26 18:52:51 +02:00
services.rustdesk-server = {
enable = true;
openFirewall = true;
relayIP = "100.91.88.2";
};
2024-08-10 19:23:59 +02:00
# virtualisation.waydroid.enable = true;
2024-08-07 16:33:11 +02:00
# users.users.lol = {
# isNormalUser = true;
# description = "lol";
# extraGroups = [
# "networkmanager"
# # "wheel"
# # "syncthing"
# # "tss"
# # "dialout"
# # "vboxusers"
# # "adbusers"
# ];
# initialPassword = "password123";
# };
# netwobking
# ipvx dns-search = "";
# wifi mac-address-blacklist = "";
# wifisec auth-alg = "open";
2024-04-11 13:16:26 +02:00
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
2024-04-18 21:10:13 +02:00
system.stateVersion = "23.11";
2024-04-11 13:16:26 +02:00
}