nixos/psql.nix

50 lines
1.2 KiB
Nix
Raw Normal View History

2024-06-30 20:16:17 +01:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, modulesPath, ... }:
{
imports =
[
# Include the default lxd configuration.
"${modulesPath}/virtualisation/lxc-container.nix"
# Include the container-specific autogenerated configuration.
./lxd.nix
];
networking = {
dhcpcd.enable = false;
useDHCP = false;
useHostResolvConf = false;
};
systemd.network = {
enable = true;
networks."50-eth0" = {
matchConfig.Name = "eth0";
networkConfig = {
DHCP = "ipv4";
IPv6AcceptRA = true;
};
linkConfig.RequiredForOnline = "routable";
};
};
environment.systemPackages = [
pkgs.vim
];
services.postgresql = {
enable = true;
package = pkgs.postgresql_16;
ensureDatabases = [ "default" ];
authentication = pkgs.lib.mkOverride 10 ''
#type database DBuser auth-method
local all all trust
'';
};
system.stateVersion = "24.11"; # Did you read the comment?
}