Compare commits

..

5 commits

3 changed files with 47 additions and 1 deletions

View file

@ -7,6 +7,8 @@ let
fullName = "Alexander Kobjolke";
mail = "me@failco.de";
};
myEza = if builtins.hasAttr "eza" pkgs then "eza" else "exa";
in {
imports = [
# shell config
@ -126,7 +128,7 @@ in {
};
# better ls with icons and stuff, maybe also try lsd
eza = {
${myEza} = {
enable = true;
icons = true;
enableAliases = true;

View file

@ -9,6 +9,7 @@ let
in {
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
../../modules/upgrade-pg-cluster.nix
];
nix.package = pkgs.nixUnstable;
@ -98,6 +99,11 @@ in {
publicKey = "NG9y+0RMDTjiG65yC4Z0ymJ0G5fe1mOhl4GyC3xAh1k=";
allowedIPs = [ "10.0.0.3/32" ];
}
{
# homematic
publicKey = "slqWgVksOCav0bASxupaFGqfr6vajxDRNIlZYocONQ4=";
allowedIPs = [ "10.0.0.4/32" ];
}
];
};
};
@ -203,6 +209,11 @@ in {
extraConfig = ''
add_header X-Frame-Options 'SAMEORIGIN';
'';
locations."/photo-groove" = {
proxyPass = "http://127.0.0.1:8000/";
proxyWebsockets = true;
};
};
"www.jakalx.net" = {
@ -378,6 +389,7 @@ in {
virusScanning = true;
};
services.postgresql = { package = pkgs.postgresql_15; };
services.roundcube = {
enable = true;
hostName = "mail.failco.de";

View file

@ -0,0 +1,32 @@
{ config, pkgs, ... }:
{
environment.systemPackages = [
(let
# XXX specify the postgresql package you'd like to upgrade to.
# Do not forget to list the extensions you need.
newPostgres = pkgs.postgresql_15.withPackages (pp: [
# pp.plv8
]);
in pkgs.writeScriptBin "upgrade-pg-cluster" ''
set -eux
# XXX it's perhaps advisable to stop all services that depend on postgresql
systemctl stop postgresql
export NEWDATA="/var/lib/postgresql/${newPostgres.psqlSchema}"
export NEWBIN="${newPostgres}/bin"
export OLDDATA="${config.services.postgresql.dataDir}"
export OLDBIN="${config.services.postgresql.package}/bin"
install -d -m 0700 -o postgres -g postgres "$NEWDATA"
cd "$NEWDATA"
sudo -u postgres $NEWBIN/initdb -D "$NEWDATA"
sudo -u postgres $NEWBIN/pg_upgrade \
--old-datadir "$OLDDATA" --new-datadir "$NEWDATA" \
--old-bindir $OLDBIN --new-bindir $NEWBIN \
"$@"
'')
];
}