2024-12-30 19:12:49 +04:00
|
|
|
{ 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
|
|
|
|
./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-30 19:12:49 +04:00
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
|
2024-12-30 19:12:49 +04:00
|
|
|
boot.loader = {
|
|
|
|
timeout = 3;
|
2024-12-31 16:37:36 +04:00
|
|
|
efi.canTouchEfiVariables = true;
|
2024-12-30 19:12:49 +04:00
|
|
|
systemd-boot = {
|
|
|
|
enable = true;
|
|
|
|
configurationLimit = 10;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-12-31 16:46:43 +04:00
|
|
|
users.users.sako = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
|
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;
|
2025-01-01 01:18:25 +04:00
|
|
|
services = {
|
|
|
|
forgejo.enable = true;
|
2025-01-01 02:12:42 +04:00
|
|
|
headscale.enable = true;
|
2025-01-01 01:18:25 +04:00
|
|
|
};
|
2025-01-03 19:27:06 +04:00
|
|
|
fedi = { akkoma.enable = true; };
|
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
|
|
|
}
|