niksos/hosts/chmura/configuration.nix

108 lines
2.2 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
2023-08-02 15:54:19 +02:00
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
users.users.chmura = {
isNormalUser = true;
2023-08-02 15:54:19 +02:00
extraGroups = [ "wheel" "docker" ];
shell = pkgs.zsh;
packages = with pkgs; [
curl
neovim
neofetch
git
wireguard-tools
ntfy
btop
2023-08-02 15:54:19 +02:00
docker
docker-compose
nodePackages_latest.pnpm
nodePackages_latest.prisma
prisma-engines
openssl
pkg-config
direnv
nix-direnv
2023-08-02 15:54:19 +02:00
git-annex
];
};
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 = false;
PermitRootLogin = "no";
2023-07-17 21:50:32 +02:00
};
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-08-02 15:54:19 +02:00
virtualHosts."test.jacekpoz.pl".extraConfig = ''
reverse_proxy * localhost:3001
'';
};
2023-07-14 23:12:41 +02:00
2023-07-15 23:42:18 +02:00
virtualisation = {
2023-08-02 15:54:19 +02:00
#podman = {
# enable = true;
# dockerCompat = true;
#};
#oci-containers.backend = "podman";
docker.enable = true;
};
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
}