niksos/hosts/chmura/configuration.nix
jacekpoz 59febb2149
move the config' arg to a custom module (big)
shoutout to raf for pointing out how retarded this was
this was needed very much
2024-02-29 00:29:56 +01:00

121 lines
2.6 KiB
Nix

{
config,
inputs,
pkgs,
...
}: let
username = config.myOptions.other.system.username;
in {
nixpkgs = {
# fuck broadcom
config.allowUnfree = true;
overlays = [ inputs.neovim-nightly-overlay.overlay ];
};
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
time.timeZone = "Europe/Warsaw";
nix.settings = {
experimental-features = [
"flakes"
"nix-command"
];
trusted-users = [
"root"
username
];
};
programs.zsh.enable = true;
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
users.users.${username} = {
extraGroups = [ "docker" ];
packages = with pkgs; [
curl
neovim
neofetch
git
wireguard-tools
btop
docker
docker-compose
nodePackages_latest.pnpm
nodePackages_latest.prisma
prisma-engines
openssl
pkg-config
direnv
nix-direnv
git-annex
];
};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
};
services.caddy = {
enable = true;
virtualHosts."test.jacekpoz.pl".extraConfig = ''
reverse_proxy * localhost:3001
'';
virtualHosts."f.jacekpoz.pl".extraConfig = ''
root * /srv
file_server
'';
};
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
};
oci-containers.backend = "podman";
};
networking.firewall.allowedTCPPorts = [ 80 443 22 ];
myOptions = {
other = {
system = {
hostname = "chmura";
username = "chmura";
};
};
programs = {
git = {
enable = true;
userName = "jacekpoz";
userEmail = "jacekpoz@cock.li";
signingKey = "0EEE6B0C9A8CC06820E59C3894E812A8B12AAE3C";
defaultBranch = "master";
};
starship.enable = true;
zsh.enable = true;
btop.enable = true;
neovim.enable = true;
helix.enable = true;
};
services.ssh = {
agent.enable = false;
daemon.enable = true;
};
};
system.stateVersion = "23.11";
}