nixos/hosts/sakoserver/configuration.nix

127 lines
3.1 KiB
Nix
Raw Normal View History

{ config, pkgs, lib, inputs, outputs, ... }: {
2024-12-31 20:39:42 +04:00
imports = [
inputs.home-manager.nixosModules.default
outputs.nixosModules.shell
outputs.nixosModules.server
2025-01-11 16:00:52 +04:00
outputs.nixosModules.media
2024-12-31 20:39:42 +04:00
./hardware-configuration.nix
];
2024-04-03 16:50:45 +04:00
2024-12-31 16:37:36 +04:00
# its you!
2024-04-03 16:50:45 +04:00
networking.hostName = "sakoserver";
2024-12-31 16:37:36 +04:00
# why not
networking.networkmanager.enable = true;
time.timeZone = "Asia/Dubai";
# locale
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
boot.loader = {
timeout = 3;
2024-12-31 16:37:36 +04:00
efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
configurationLimit = 10;
};
};
2024-12-31 16:46:43 +04:00
users.users.sako = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
nix.settings = { experimental-features = [ "nix-command" "flakes" ]; };
2024-12-31 20:41:28 +04:00
home-manager.useUserPackages = true;
home-manager.users.sako = { pkgs, ... }: {
home.username = "sako";
home.homeDirectory = "/home/sako";
2024-12-31 20:42:04 +04:00
home.stateVersion = "24.11";
2024-12-31 20:41:28 +04:00
programs.bash.enable = true;
};
2024-12-31 19:18:03 +04:00
environment.systemPackages = with pkgs; [
vim
neovim
wget
killall
unzip
htop
ripgrep
];
2024-12-31 16:46:43 +04:00
# networking.firewall.allowedTCPPorts = [];
# networking.firewall.allowedUDPPorts = [];
2025-01-02 22:57:33 +04:00
# To trust others, you first must trust yourself
# - Homless guy that looked like Sun Tzu
2025-01-02 22:58:32 +04:00
security.pki.certificateFiles =
[ ../../modules/security/certs/trust/homelab.pem ];
2025-01-02 22:57:33 +04:00
2024-12-31 20:39:42 +04:00
modules.shell.tmux.enable = true;
2025-01-11 16:00:52 +04:00
modules.media.beets.enable = true;
2024-12-31 20:39:42 +04:00
2024-12-31 17:46:18 +04:00
void = {
server = {
isServer = true;
dns.blocky.enable = true;
2024-12-31 18:45:36 +04:00
nginx.enable = true;
2024-12-31 23:02:41 +04:00
postgresql.enable = true;
2025-01-01 14:29:16 +04:00
redis.enable = true;
2025-01-01 15:20:52 +04:00
fail2ban.enable = true;
2025-01-02 13:08:10 +04:00
ddclient.enable = true;
services = {
2025-01-04 21:57:01 +04:00
sakosite.enable = true;
2025-01-04 19:55:38 +04:00
forgejo = {
enable = true;
2025-01-04 20:20:39 +04:00
# runner.enable = true;
2025-01-04 20:46:35 +04:00
woodpecker.enable = true;
2025-01-05 18:06:17 +04:00
# pages = {
# enable = true;
# settings = {
# HOST = "127.0.0.1";
# PORT = "4563";
# ACME_ACCEPT_TERMS = "TRUE";
# ENABLE_HTTP_SERVER = "TRUE";
# # Large instances shouldn't do this
# # NO_DNS_01 = "TRUE";
# DNS_PROVIDER = "porkbun";
# GITEA_ROOT = "https://git.sako.lol";
# PAGES_DOMAIN = "pages.sako.lol";
# RAW_DOMAIN = "raw.pages.sako.lol";
# };
# environmentFile = "/srv/secrets/codeberg-pages.env";
# };
2025-01-04 19:55:38 +04:00
};
2025-01-01 02:12:42 +04:00
headscale.enable = true;
2025-01-05 14:06:30 +04:00
redlib.enable = true;
2025-01-05 19:28:38 +04:00
local = {
homepage.enable = true;
2025-01-12 09:08:44 +04:00
nextcloud.enable = true;
2025-01-05 19:28:38 +04:00
};
};
2025-01-03 19:53:22 +04:00
fedi = { akkoma.enable = true; };
game = { minecraft.enable = false; };
2025-01-01 16:19:36 +04:00
media = {
qbittorrent = {
enable = true;
torrentPort = 55907;
openFirewall = true;
group = "media";
};
2025-01-03 01:00:52 +04:00
jellyfin.enable = true;
2025-01-01 16:19:36 +04:00
};
2024-12-31 17:46:18 +04:00
};
};
2024-12-31 16:43:44 +04:00
2024-12-31 16:46:43 +04:00
# https://nixos.org/manual/nixos/stable/#sec-upgrading
2024-12-31 16:43:44 +04:00
# don't change this pls ty ily thanks
system.stateVersion = "24.11";
2024-12-31 16:41:32 +04:00
}