niksos/hosts/chmura/configuration.nix

86 lines
1.7 KiB
Nix
Raw Normal View History

2023-07-13 12:49:20 +02:00
{
config,
pkgs,
inputs,
...
2023-07-13 12:49:20 +02:00
}: {
# fuck broadcom
nixpkgs.config.allowUnfree = true;
2023-07-13 12:49:20 +02:00
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
2023-07-13 12:49:20 +02:00
time.timeZone = "Europe/Warsaw";
2023-07-13 12:49:20 +02:00
nix.settings = {
experimental-features = [
"flakes"
"nix-command"
];
trusted-users = [
"root"
"chmura"
];
};
programs.zsh.enable = true;
2023-07-13 12:49:20 +02:00
users.users.chmura = {
isNormalUser = true;
extraGroups = ["wheel"];
shell = pkgs.zsh;
packages = with pkgs; [
curl
neovim
neofetch
git
wireguard-tools
ntfy
];
};
2023-07-13 12:49:20 +02:00
environment = {
shells = with pkgs; [zsh];
pathsToLink = [ "/share/zsh" ];
sessionVariables = {
EDITOR = "nvim";
};
};
2023-07-13 12:49:20 +02:00
services.openssh = {
enable = true;
2023-07-17 21:50:32 +02:00
settings = {
PasswordAuthentication = true;
PermitRootLogin = "yes";
};
2023-07-13 12:49:20 +02:00
};
services.caddy = {
enable = true;
virtualHosts."trollface.pl".extraConfig = ''
@discord {
header_regexp User-Agent (?i)(Discord)
path /
}
2023-07-13 12:49:20 +02:00
rewrite @discord /trollface.png
2023-07-14 23:12:41 +02:00
root * ${./trollface.pl}
file_server
'';
};
2023-07-14 23:12:41 +02:00
2023-07-15 23:42:18 +02:00
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
};
oci-containers.backend = "podman";
};
2023-07-14 13:30:53 +02:00
networking.firewall.allowedTCPPorts = [ 80 443 22 ];
2023-07-13 12:49:20 +02:00
system.stateVersion = "23.11";
2023-07-13 12:49:20 +02:00
}