niksos/hosts/chmura/configuration.nix

114 lines
2.3 KiB
Nix
Raw Normal View History

2023-07-13 12:49:20 +02:00
{
2023-09-13 20:58:03 +02:00
inputs,
pkgs,
2023-09-09 00:05:59 +02:00
config',
...
2023-07-13 12:49:20 +02:00
}: {
2023-09-13 20:58:03 +02:00
nixpkgs = {
# fuck broadcom
config.allowUnfree = true;
overlays = [ inputs.neovim-nightly-overlay.overlay ];
};
2023-07-13 12:49:20 +02:00
2023-08-11 00:00:19 +02:00
boot.loader = {
systemd-boot.enable = true;
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"
2023-09-09 00:05:59 +02:00
config'.username
];
};
2023-09-12 18:37:59 +02:00
networking.hostName = config'.hostname;
2023-09-08 16:10:15 +02:00
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;
};
2023-09-09 00:05:59 +02:00
users.users.${config'.username} = {
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
}